ports/147280: [PATCH] archivers/xz: do not depend on autoconf

Martin Matuska mm at FreeBSD.org
Tue Jun 1 13:30:02 UTC 2010


>Number:         147280
>Category:       ports
>Synopsis:       [PATCH] archivers/xz: do not depend on autoconf
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 01 13:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.1-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #2 r208689M: Tue Jun  1 10:51:26
>Description:
As we want to use xz for extraction of port's distfiles, 
it cannot depend on autoconf.
Replace patch-configure.ac with patch-configure and remove USE_AUTOTOOLS.

Added file(s):
- files/patch-configure

Removed file(s):
- files/patch-configure.ac

Port maintainer (naddy at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- xz-4.999.9_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/archivers/xz/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	21 May 2010 16:27:30 -0000	1.13
+++ Makefile	1 Jun 2010 13:23:02 -0000
@@ -18,9 +18,9 @@
 CONFLICTS=	lzma-[0-9]* lzmautils-[0-9]* lzmalib-[0-9]*
 
 MAKE_JOBS_SAFE=	yes
-USE_AUTOTOOLS=	autoheader:262 autoconf:262
 USE_LDCONFIG=	yes
 USE_GNOME=	gnomehack
+GNU_CONFIGURE=	yes
 
 CONFIGURE_ARGS=	--enable-dynamic=yes
 CONFIGURE_ARGS+=--disable-nls	# no translations available
@@ -46,10 +46,6 @@
 PORTDOCS=	AUTHORS COPYING COPYING.GPLv2 NEWS README THANKS TODO \
 		faq.txt history.txt lzma-file-format.txt xz-file-format.txt
 
-# no need to (attempt to) run aclocal
-pre-build:
-	@touch -r ${WRKSRC}/configure.ac ${WRKSRC}/aclocal.m4
-
 regression-test: build
 	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
 
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-configure	1 Jun 2010 13:23:02 -0000
@@ -0,0 +1,110 @@
+--- /tmp/configure	2010-06-01 15:06:19.000000000 +0200
++++ configure	2010-06-01 15:06:40.813799251 +0200
+@@ -15182,7 +15182,7 @@
+ 
+ 
+ # If any of these headers are missing, things should still work correctly:
+-for ac_header in sys/param.h sys/sysctl.h byteswap.h
++for ac_header in sys/param.h sys/sysctl.h byteswap.h sys/endian.h
+ do :
+   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+@@ -15296,6 +15296,98 @@
+ 
+ 	fi
+ 
++if test x$ac_cv_header_sys_endian_h = xyes ; then
++
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap16 is available" >&5
++$as_echo_n "checking if bswap16 is available... " >&6; }
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/endian.h>
++int
++main(void)
++{
++	bswap16(42);
++	return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
++
++$as_echo "#define HAVE_BSWAP16 1" >>confdefs.h
++
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++
++
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap32 is available" >&5
++$as_echo_n "checking if bswap32 is available... " >&6; }
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/endian.h>
++int
++main(void)
++{
++	bswap32(42);
++	return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
++
++$as_echo "#define HAVE_BSWAP32 1" >>confdefs.h
++
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++
++
++		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bswap64 is available" >&5
++$as_echo_n "checking if bswap64 is available... " >&6; }
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++#include <sys/endian.h>
++int
++main(void)
++{
++	bswap64(42);
++	return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++
++
++$as_echo "#define HAVE_BSWAP64 1" >>confdefs.h
++
++			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++
++	fi
+ 
+ ###############################################################################
+ # Checks for typedefs, structures, and compiler characteristics.
Index: files/patch-configure.ac
===================================================================
RCS file: files/patch-configure.ac
diff -N files/patch-configure.ac
--- files/patch-configure.ac	1 Oct 2009 21:49:43 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
---- configure.ac.orig	2009-08-27 17:37:12.000000000 +0200
-+++ configure.ac	2009-09-29 20:32:39.000000000 +0200
-@@ -476,7 +476,7 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/t
- 	[AC_MSG_ERROR([Required header file(s) are missing.])])
- 
- # If any of these headers are missing, things should still work correctly:
--AC_CHECK_HEADERS([sys/param.h sys/sysctl.h byteswap.h],
-+AC_CHECK_HEADERS([sys/param.h sys/sysctl.h byteswap.h sys/endian.h],
- 	[], [], [
- #ifdef HAVE_SYS_PARAM_H
- #	include <sys/param.h>
-@@ -504,6 +504,25 @@ main(void)
- 	])dnl
- fi
- 
-+if test x$ac_cv_header_sys_endian_h = xyes ; then
-+	m4_foreach([FUNC], [bswap16,bswap32,bswap64], [
-+		AC_MSG_CHECKING([if FUNC is available])
-+		AC_LINK_IFELSE([AC_LANG_SOURCE([
-+#include <sys/endian.h>
-+int
-+main(void)
-+{
-+	FUNC[](42);
-+	return 0;
-+}
-+		])], [
-+			AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
-+					[Define to 1 if] FUNC [is available.])
-+			AC_MSG_RESULT([yes])
-+		], [AC_MSG_RESULT([no])])
-+
-+	])dnl
-+fi
- 
- ###############################################################################
- # Checks for typedefs, structures, and compiler characteristics.
--- xz-4.999.9_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list