o Another try at fixing -CURRENT issues with getopt_long_only()

- Always depend on libgnugetopt port
	- Add include/mpeg4ip_getopt.h as a workaround for 5.x
	  branch native getopt.h implementation
	- Futhermore, change regexp regarding PTHREAD_LIBS issue
	  on -CURRENT. Submitter reports that previous one did not
	  work but that newer does

PR:		50233
Submitted by:	David Yeske <dyeske@yahoo.com>
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2003-05-15 04:53:17 +00:00
parent e1ad2dbc07
commit 642e382ec5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=81010
2 changed files with 17 additions and 6 deletions

View file

@ -17,9 +17,9 @@ COMMENT= Standards-based system to encode, stream and play MPEG-4 audio/video
BUILD_DEPENDS= libtool:${PORTSDIR}/devel/libtool \
nasm:${PORTSDIR}/devel/nasm \
pkg-config:${PORTSDIR}/devel/pkgconfig
LIB_DEPENDS= SDL-1.1.5:${PORTSDIR}/devel/sdl12
LIB_DEPENDS= SDL-1.1.5:${PORTSDIR}/devel/sdl12 \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
USE_GETOPT_LONG= yes
USE_GNOME= gtk20
USE_GMAKE= yes
USE_LIBTOOL= yes
@ -29,6 +29,8 @@ CONFIGURE_ARGS= --datadir=${DATADIR} \
--with-glib-prefix=${LOCALBASE} \
--with-gtk-prefix=${X11BASE} \
--program-transform-name=''
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
INSTALLS_SHLIB= yes
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
@ -110,13 +112,10 @@ post-patch:
@${REINPLACE_CMD} -E -e \
's!SDL_(AudioDelayMsec|HasAudioDelayMsec).*;$$!0;!' \
${WRKSRC}/player/src/audio_sdl.cpp
# -CURRENT after 500041 has getopt_long
# use libgnugetopt
.if ${OSVERSION} < 500041
@${REINPLACE_CMD} -E -e \
's|(-lm)|\1 -lgnugetopt|' \
${WRKSRC}/util/iptv/Makefile.in
.endif
# do not install manm man pages
@${REINPLACE_CMD} -E \
-e 's|api.mpt||' \
@ -134,7 +133,7 @@ post-configure:
# investigated by David Yeske <dyeske@yahoo.com>
.if ${OSVERSION} >= 500000
@${REINPLACE_CMD} -E \
-e 's|(-lSDL)|${PTHREAD_LIBS} \1|' \
-e 's|(-lSDL-...)|"${PTHREAD_LIBS} \1"|' \
${WRKSRC}/player/src/Makefile \
${WRKSRC}/util/yuv/Makefile \
${WRKSRC}/util/iptv/Makefile

View file

@ -0,0 +1,12 @@
--- include/mpeg4ip_getopt.h.orig Tue Oct 15 13:12:27 2002
+++ include/mpeg4ip_getopt.h Mon Feb 24 05:23:50 2003
@@ -11,6 +11,9 @@
#endif
#ifdef HAVE_GETOPT_H
+#ifdef __FreeBSD__
+#define __GNU_LIBRARY__
+#endif
#include <getopt.h>
#endif