- Fix building on FreeBSD versions without objformat(1).

- Fix building with GCC 4.x.
- Use ARCH instead of MACHINE_ARCH.
- Remove support for FreeBSD < 5.x.

Reported by:	pointyhat
This commit is contained in:
Alejandro Pulver 2007-03-23 04:33:21 +00:00
parent a85af7ba67
commit 4d338ffbb3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188074
4 changed files with 39 additions and 22 deletions

View File

@ -17,18 +17,17 @@ COMMENT= Text user interface using the xine library
LIB_DEPENDS= xine.1:${PORTSDIR}/multimedia/libxine
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -I${X11BASE}/lib"
MAN1= toxine.1
OPTIONS= AALIB "Enable aalib support" on \
LIBCACA "Enable libcaca support" on \
OPTIMIZED_CFLAGS "Enable compilation optimizations" on
MAN1= toxine.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 502000
@ -36,10 +35,6 @@ LIB_DEPENDS+= readline.5:${PORTSDIR}/devel/readline
CONFIGURE_ARGS+=--with-readline=${LOCALBASE}
.endif
.if ${OSVERSION} < 500000
EXTRA_PATCHES= ${FILESDIR}/extra-patch-main.c
.endif
.if !defined(WITHOUT_AALIB)
LIB_DEPENDS+= aa.1:${PORTSDIR}/graphics/aalib
PLIST_SUB+= AALIB=""

View File

@ -1,13 +0,0 @@
FreeBSD 4.X does not have O_SYNC yet
--- src/main.c.orig Mon Apr 12 17:55:02 2004
+++ src/main.c Wed Jul 6 12:16:42 2005
@@ -207,7 +207,7 @@
{
char *ofile = (optarg) ? optarg : "toxine.out";
- if((tox->msg_fd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, 0644)) < 0) {
+ if((tox->msg_fd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC | O_FSYNC, 0644)) < 0) {
fprintf(stderr, "Cannot open %s: %s\n", ofile, strerror(errno));
exit(1);
}

View File

@ -1,5 +1,27 @@
--- configure.orig Thu May 6 18:22:57 2004
+++ configure Wed Jul 13 17:36:09 2005
+++ configure Fri Mar 23 00:19:27 2007
@@ -7496,7 +7496,7 @@
;;
freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
@@ -9071,10 +9071,10 @@
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS=" /usr/local/share/libtool/ltmain.sh"
# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIBTOOL='$(SHELL) /usr/local/bin/libtool'
# Prevent multiple expansion
@@ -13267,10 +13267,6 @@
DEBUG_CFLAGS="$DEBUG_CFLAGS -O3"
;;

View File

@ -0,0 +1,13 @@
--- src/main.c.orig Mon Apr 12 12:55:02 2004
+++ src/main.c Thu Mar 22 19:00:30 2007
@@ -127,8 +127,8 @@
}
toxine_free(tox->configfile);
- toxine_free((char *)tox->video.name);
- toxine_free((char *)tox->audio.name);
+ toxine_free(tox->video.name);
+ toxine_free(tox->audio.name);
toxine_free(tox->command.line);
toxine_free(tox->command.remain);
toxine_free(tox->command.command);