freebsd-ports/multimedia/gpac-libgpac/files/patch-configure
Jung-uk Kim 1e8fc945d5 - Make IPv6 and OpenGL optional but turn them on by default[1].
- Fix build with OpenGL and register its dependency when it is enabled.
- Move FreeBSD-specific stuff into configure script from src/Makefile.
- Make portlint happy with PKGNAMESUFFIX.

PR:	ports/131681[1], ports/131713, ports/131789
2009-02-19 23:20:57 +00:00

66 lines
1.7 KiB
Text

--- configure.orig 2008-12-02 13:04:42.000000000 -0500
+++ configure 2009-02-19 15:16:18.000000000 -0500
@@ -33,6 +33,7 @@
make="make"
strip="strip"
cpu=`uname -m`
+targetos=`uname -s`
debuginfo="no"
sdl_path=""
sdl_local="no"
@@ -222,7 +223,9 @@
if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
cpu="x86_64"
- libdir="lib64"
+ if [ x"$targetos" != x"FreeBSD" ]; then
+ libdir="lib64"
+ fi
#that's a bit crude...
PIC_CFLAGS="-fPIC -DPIC"
want_pic="yes"
@@ -280,7 +283,6 @@
source_path="`cd \"$source_path\"; pwd`"
fi
# OS specific
-targetos=`uname -s`
case $targetos in
BeOS)
js_flags=-DXP_BEOS
@@ -317,8 +319,8 @@
FreeBSD)
make="gmake"
LDFLAGS="$LDFLAGS -export-dynamic"
-CFLAGS="$CFLAGS -pthread"
-GPAC_SH_FLAGS=-pthread
+DYN_LIB_SUFFIX="so.$LIBVER"
+GPAC_SH_FLAGS="$PTHREAD_LIBS"
freebsd="yes"
js_flags="-DXP_UNIX -I/usr/include/js"
;;
@@ -1111,6 +1113,8 @@
LINK3D="-lopengl32 -lglu32"
elif test "$darwin" = "yes" ; then
LINK3D="-lgl -lglu"
+ elif test "$freebsd" = "yes" ; then
+ LINK3D="-lGL -lGLU"
else
LINK3D="-lGL -lglut"
fi
@@ -1673,7 +1677,7 @@
echo "USE_X11_XV=$has_x11_xv" >> config.mak
fi
-if test "$is_64" = "yes"; then
+if test "$is_64" = "yes" -a "$freebsd" = "no" ; then
echo "X11_LIB_PATH=$X11_PATH/lib64" >> config.mak
else
echo "X11_LIB_PATH=$X11_PATH/lib" >> config.mak
@@ -1805,6 +1809,6 @@
fi
echo '%.opic : %.c' >> config.mak
-echo ' $(CC) $(CFLAGS) $(PIC_CFLAGS) -c $< -o $@' >> config.mak
+echo " \$(CC) \$(CFLAGS) \$(PIC_CFLAGS) $INCL3D -c \$< -o \$@" >> config.mak
echo "Done - type 'make help' for make info, 'make' to build"