[vlc-commits] [Git][videolan/vlc][master] 10 commits: package/win32: don't export HAVE_WINSTORE
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Oct 12 14:20:14 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7f7405c9 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: don't export HAVE_WINSTORE
The contribs and VLC have their own way of detecting/unabling winstore builds.
- - - - -
5e67a886 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: use internal xxxFLAGS variables
For now we keep exporting the usual names
- - - - -
fd2a8dbd by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: pass the xxxFLAGS to meson via the command line
- - - - -
9165d99c by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: pass the xxxFLAGS without exporting them
- - - - -
4290a69d by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: use internal AR/RANLIB variables
For now we keep exporting the usual names
- - - - -
1a9fe27e by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: pass the AR/RANLIB without exporting them
- - - - -
64297f36 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: use internal PKG_CONFIG/PKG_CONFIG_LIBDIR variables
For now we keep exporting the usual names
- - - - -
f341ca78 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: set PKG_CONFIG/PKG_CONFIG_LIBDIR variables before building contribs
- - - - -
60a8da05 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: pass the PKG_CONFIG/PKG_CONFIG_LIBDIR without exporting them
- - - - -
c272db05 by Steve Lhomme at 2024-10-12T13:55:52+00:00
package/win32: use config.mak to pass custom flags to contribs
- - - - -
1 changed file:
- extras/package/win32/build.sh
Changes:
=====================================
extras/package/win32/build.sh
=====================================
@@ -255,14 +255,23 @@ else
fi
fi
+VLC_CFLAGS="$CFLAGS"
+unset CFLAGS
+VLC_CXXFLAGS="$CXXFLAGS"
+unset CXXFLAGS
+VLC_CPPFLAGS="$CPPFLAGS"
+unset CPPFLAGS
+VLC_LDFLAGS="$LDFLAGS"
+unset LDFLAGS
+
if [ ! -z "$BUILD_UCRT" ]; then
WIDL=${TRIPLET}-widl
- CPPFLAGS="$CPPFLAGS -D__MSVCRT_VERSION__=0xE00 -D_UCRT"
+ VLC_CPPFLAGS="$VLC_CPPFLAGS -D__MSVCRT_VERSION__=0xE00 -D_UCRT"
if [ ! -z "$WINSTORE" ]; then
SHORTARCH="$SHORTARCH-uwp"
TRIPLET=${TRIPLET}uwp
- CPPFLAGS="$CPPFLAGS -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_UNICODE -DUNICODE"
+ VLC_CPPFLAGS="$VLC_CPPFLAGS -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_UNICODE -DUNICODE"
if [ -z "$NTDDI" ]; then
WINVER=0x0A00
@@ -273,25 +282,25 @@ if [ ! -z "$BUILD_UCRT" ]; then
fi
fi
- LDFLAGS="$LDFLAGS -lwindowsapp"
- CFLAGS="$CFLAGS -Wl,-lwindowsapp"
- CXXFLAGS="$CXXFLAGS -Wl,-lwindowsapp"
+ VLC_LDFLAGS="$VLC_LDFLAGS -lwindowsapp"
+ VLC_CFLAGS="$VLC_CFLAGS -Wl,-lwindowsapp"
+ VLC_CXXFLAGS="$VLC_CXXFLAGS -Wl,-lwindowsapp"
if [ "$COMPILING_WITH_CLANG" -gt 0 ]; then
- CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
- CXXFLAGS="$CXXFLAGS -Wno-unused-command-line-argument"
+ VLC_CFLAGS="$VLC_CFLAGS -Wno-unused-command-line-argument"
+ VLC_CXXFLAGS="$VLC_CXXFLAGS -Wno-unused-command-line-argument"
fi
else
SHORTARCH="$SHORTARCH-ucrt"
fi
- LDFLAGS="$LDFLAGS -lucrt"
+ VLC_LDFLAGS="$VLC_LDFLAGS -lucrt"
if [ ! "$COMPILING_WITH_CLANG" -gt 0 ]; then
# assume gcc
NEWSPECFILE="`pwd`/specfile-$SHORTARCH"
# tell gcc to replace msvcrt with ucrtbase+ucrt
$CC -dumpspecs | sed -e "s/-lmsvcrt/-lucrt/" > $NEWSPECFILE
- CFLAGS="$CFLAGS -specs=$NEWSPECFILE"
- CXXFLAGS="$CXXFLAGS -specs=$NEWSPECFILE"
+ VLC_CFLAGS="$VLC_CFLAGS -specs=$NEWSPECFILE"
+ VLC_CXXFLAGS="$VLC_CXXFLAGS -specs=$NEWSPECFILE"
if [ ! -z "$WINSTORE" ]; then
# trick to provide these libraries instead of -ladvapi32 -lshell32 -luser32 -lkernel32
@@ -301,29 +310,23 @@ if [ ! -z "$BUILD_UCRT" ]; then
sed -i -e "s/-lkernel32//" $NEWSPECFILE
fi
fi
-
- # the values are not passed to the makefiles/configures
- export LDFLAGS
else
# use the regular msvcrt
- CPPFLAGS="$CPPFLAGS -D__MSVCRT_VERSION__=0x700"
+ VLC_CPPFLAGS="$VLC_CPPFLAGS -D__MSVCRT_VERSION__=0x700"
fi
if [ -n "$NTDDI" ]; then
WINVER=`echo ${NTDDI} |cut -c 1-6`
- CPPFLAGS="$CPPFLAGS -DNTDDI_VERSION=$NTDDI"
+ VLC_CPPFLAGS="$VLC_CPPFLAGS -DNTDDI_VERSION=$NTDDI"
fi
if [ -z "$WINVER" ]; then
# The current minimum for VLC is Windows 7
WINVER=0x0601
fi
-CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=${WINVER} -DWINVER=${WINVER}"
-
-# the values are not passed to the makefiles/configures
-export CPPFLAGS
+VLC_CPPFLAGS="$VLC_CPPFLAGS -D_WIN32_WINNT=${WINVER} -DWINVER=${WINVER}"
-CFLAGS="$CPPFLAGS $CFLAGS"
-CXXFLAGS="$CPPFLAGS $CXXFLAGS"
+VLC_CFLAGS="$VLC_CPPFLAGS $VLC_CFLAGS"
+VLC_CXXFLAGS="$VLC_CPPFLAGS $VLC_CXXFLAGS"
info "Building contribs"
echo $PATH
@@ -332,8 +335,8 @@ mkdir -p contrib/contrib-$SHORTARCH && cd contrib/contrib-$SHORTARCH
if [ ! -z "$WITH_PDB" ]; then
CONTRIBFLAGS="$CONTRIBFLAGS --enable-pdb"
if [ ! -z "$PDB_MAP" ]; then
- CFLAGS="$CFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
- CXXFLAGS="$CXXFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
+ VLC_CFLAGS="$VLC_CFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
+ VLC_CXXFLAGS="$VLC_CXXFLAGS -fdebug-prefix-map='$VLC_ROOT_PATH'='$PDB_MAP'"
fi
fi
if [ ! -z "$BREAKPAD" ]; then
@@ -345,22 +348,59 @@ fi
if [ ! -z "$DISABLEGUI" ]; then
CONTRIBFLAGS="$CONTRIBFLAGS --disable-qt --disable-qtsvg --disable-qtdeclarative --disable-qt5compat --disable-qtshadertools --disable-qtwayland"
fi
-if [ ! -z "$WINSTORE" ]; then
- # we don't use a special toolchain to trigger the detection in contribs so force it manually
- export HAVE_WINSTORE=1
-fi
if [ "$COMPILING_WITH_CLANG" -gt 0 ]; then
# avoid using gcc-ar with the clang toolchain, if both are installed
- AR="$TRIPLET-ar"
- export AR
+ VLC_AR="$TRIPLET-ar"
# avoid using gcc-ranlib with the clang toolchain, if both are installed
- RANLIB="$TRIPLET-ranlib"
- export RANLIB
+ VLC_RANLIB="$TRIPLET-ranlib"
+fi
+
+if [ -z "$PKG_CONFIG" ]; then
+ if [ "$(unset PKG_CONFIG_LIBDIR; $TRIPLET-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL)" = "FAIL" ]; then
+ # $TRIPLET-pkg-config DOESNT WORK
+ # on Debian it pretends it works to autoconf
+ VLC_PKG_CONFIG="pkg-config"
+ if [ -z "$PKG_CONFIG_LIBDIR" ]; then
+ VLC_PKG_CONFIG_LIBDIR="/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
+ else
+ VLC_PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
+ fi
+ fi
+else
+ VLC_PKG_CONFIG="$PKG_CONFIG"
+fi
+
+# generate the config.mak for contribs
+test -e config.mak && unlink config.mak
+exec 3>config.mak || return $?
+
+printf '# This file was automatically generated!\n\n' >&3
+if [ -n "$VLC_CPPFLAGS" ]; then
+ printf '%s := %s\n' "CPPFLAGS" "${VLC_CPPFLAGS}" >&3
+fi
+if [ -n "$VLC_CFLAGS" ]; then
+ printf '%s := %s\n' "CFLAGS" "${VLC_CFLAGS}" >&3
+fi
+if [ -n "$VLC_CXXFLAGS" ]; then
+ printf '%s := %s\n' "CXXFLAGS" "${VLC_CXXFLAGS}" >&3
+fi
+if [ -n "$VLC_LDFLAGS" ]; then
+ printf '%s := %s\n' "LDFLAGS" "${VLC_LDFLAGS}" >&3
+fi
+if [ -n "$VLC_AR" ]; then
+ printf '%s := %s\n' "AR" "${VLC_AR}" >&3
+fi
+if [ -n "$VLC_RANLIB" ]; then
+ printf '%s := %s\n' "RANLIB" "${VLC_RANLIB}" >&3
+fi
+if [ -n "$VLC_PKG_CONFIG" ]; then
+ printf '%s := %s\n' "PKG_CONFIG" "${VLC_PKG_CONFIG}" >&3
+fi
+if [ -n "$VLC_PKG_CONFIG_LIBDIR" ]; then
+ printf '%s := %s\n' "PKG_CONFIG_LIBDIR" "${VLC_PKG_CONFIG_LIBDIR}" >&3
fi
-export CFLAGS
-export CXXFLAGS
${VLC_ROOT_PATH}/contrib/bootstrap --host=$TRIPLET --prefix=../$CONTRIB_PREFIX $CONTRIBFLAGS
@@ -386,21 +426,7 @@ else
fi
cd ../..
-if [ -z "$PKG_CONFIG" ]; then
- if [ "$(unset PKG_CONFIG_LIBDIR; $TRIPLET-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL)" = "FAIL" ]; then
- # $TRIPLET-pkg-config DOESNT WORK
- # on Debian it pretends it works to autoconf
- export PKG_CONFIG="pkg-config"
- if [ -z "$PKG_CONFIG_LIBDIR" ]; then
- export PKG_CONFIG_LIBDIR="/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
- else
- export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
- fi
- else
- # $TRIPLET-pkg-config WORKs
- export PKG_CONFIG="$TRIPLET-pkg-config"
- fi
-fi
+MCONFIGFLAGS="$MCONFIGFLAGS -Dc_args='${VLC_CFLAGS}' -Dc_link_args='${VLC_LDFLAGS}' -Dcpp_args='${VLC_CXXFLAGS}' -Dcpp_link_args='${VLC_LDFLAGS}'"
if [ "$RELEASE" != "yes" ]; then
CONFIGFLAGS="$CONFIGFLAGS --enable-debug"
@@ -468,6 +494,32 @@ ${VLC_ROOT_PATH}/bootstrap
mkdir -p $SHORTARCH
cd $SHORTARCH
+# set environment that will be kept in config.status
+if [ -n "$VLC_CPPFLAGS" ]; then
+ export CPPFLAGS="$VLC_CPPFLAGS"
+fi
+if [ -n "$VLC_CFLAGS" ]; then
+ export CFLAGS="$VLC_CFLAGS"
+fi
+if [ -n "$VLC_CXXFLAGS" ]; then
+ export CXXFLAGS="$VLC_CXXFLAGS"
+fi
+if [ -n "$VLC_LDFLAGS" ]; then
+ export LDFLAGS="$VLC_LDFLAGS"
+fi
+if [ -n "$VLC_AR" ]; then
+ export AR="$VLC_AR"
+fi
+if [ -n "$VLC_RANLIB" ]; then
+ export RANLIB="$VLC_RANLIB"
+fi
+if [ -n "$VLC_PKG_CONFIG" ]; then
+ export PKG_CONFIG="$VLC_PKG_CONFIG"
+fi
+if [ -n "$VLC_PKG_CONFIG_LIBDIR" ]; then
+ export PKG_CONFIG_LIBDIR="$VLC_PKG_CONFIG_LIBDIR"
+fi
+
info "Configuring VLC"
${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$CONTRIB_PREFIX "$WIXPATH" $CONFIGFLAGS
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/66b6fb39708d02c117af3fd0ef89c2e61d650a13...c272db053a3600f6bf05aa1f4b658faf49932d46
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/66b6fb39708d02c117af3fd0ef89c2e61d650a13...c272db053a3600f6bf05aa1f4b658faf49932d46
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list