[110584] trunk/dports/devel/libusb-legacy
jeremyhu at macports.org
jeremyhu at macports.org
Mon Sep 2 09:59:04 PDT 2013
Revision: 110584
https://trac.macports.org/changeset/110584
Author: jeremyhu at macports.org
Date: 2013-09-02 09:59:04 -0700 (Mon, 02 Sep 2013)
Log Message:
-----------
libusb-legacy: Build with clang
Modified Paths:
--------------
trunk/dports/devel/libusb-legacy/Portfile
Added Paths:
-----------
trunk/dports/devel/libusb-legacy/files/patch-configure.in.diff
trunk/dports/devel/libusb-legacy/files/rename.patch
Removed Paths:
-------------
trunk/dports/devel/libusb-legacy/files/patch-Makefile.in.diff
Modified: trunk/dports/devel/libusb-legacy/Portfile
===================================================================
--- trunk/dports/devel/libusb-legacy/Portfile 2013-09-02 15:55:18 UTC (rev 110583)
+++ trunk/dports/devel/libusb-legacy/Portfile 2013-09-02 16:59:04 UTC (rev 110584)
@@ -5,7 +5,7 @@
name libusb-legacy
version 0.1.12
-revision 3
+revision 4
categories devel
license LGPL-2.1
maintainers snc michaelld openmaintainer
@@ -21,60 +21,21 @@
checksums rmd160 63848df717e00fff67ab30ba86a85466370d4e8e \
sha256 37f6f7d9de74196eb5fc0bbe0aea9b5c939de7f500acba3af6fd643f3b538b44
-patchfiles patch-Makefile.in.diff patch-darwin.c.diff
+patchfiles patch-configure.in.diff patch-darwin.c.diff rename.patch
-post-patch {
- # tweak pkg-config install directory & file name
- reinplace "/pkgconfigdir/s@\\$\{libdir\}@\\$\{prefix\}/lib at g" \
- ${worksrcpath}/configure
- reinplace "/Name/s at libusb@libusb-legacy at g" \
- ${worksrcpath}/libusb.pc.in
- reinplace "s at -lusb@-lusb-legacy at g" \
- ${worksrcpath}/libusb.pc.in
- file rename ${worksrcpath}/libusb.pc.in \
- ${worksrcpath}/libusb-legacy.pc.in
- reinplace "s at libusb\.pc at libusb-legacy\.pc at g" \
- ${worksrcpath}/Makefile.in
- reinplace "s at libusb\.pc at libusb-legacy\.pc at g" \
- ${worksrcpath}/configure
+use_autoreconf yes
+autoreconf.args -fvi
- # tweak library build and install name
- reinplace "s@\\(libusb\[^ \]*\\)_la@\\1-legacy_la at g" \
- ${worksrcpath}/Makefile.in
- reinplace "s@\\(libusb\[^ \]*\\)\.la@\\1-legacy\.la at g" \
- ${worksrcpath}/Makefile.in
- reinplace "s at -lusb@-lusb-legacy at g" \
- ${worksrcpath}/Makefile.in
- reinplace "s@\\(libusb\[^ \]*\\)_la@\\1-legacy_la at g" \
- ${worksrcpath}/tests/Makefile.in
- reinplace "s@\\(libusb\[^ \]*\\)\.la@\\1-legacy\.la at g" \
- ${worksrcpath}/tests/Makefile.in
-
- # tweak libusb-config binary name
- reinplace "s at -lusb@-lusb-legacy at g" \
- ${worksrcpath}/libusb-config.in
- reinplace "s at libusb-config@libusb-legacy-config at g" \
- ${worksrcpath}/libusb-config.in
- file rename ${worksrcpath}/libusb-config.in \
- ${worksrcpath}/libusb-legacy-config.in
- reinplace "s at libusb-config@libusb-legacy-config at g" \
- ${worksrcpath}/Makefile.in
- reinplace "s at libusb-config@libusb-legacy-config at g" \
- ${worksrcpath}/configure
-}
-
-# does not work with clang when +universal; just disable clang for now
-# Undefined symbols for architecture i386
-compiler.blacklist *clang*
-
configure.args --disable-build-docs \
--libdir=${prefix}/lib/libusb-legacy \
--includedir=${prefix}/include/libusb-legacy
-post-configure {
- if {[variant_isset universal]} {
- reinplace "s|CC -dynamiclib|CC -dynamiclib ${configure.universal_ldflags}|g" ${worksrcpath}/libtool
- }
+destroot.args pkgconfigdir=${prefix}/lib/pkgconfig
+
+post-destroot {
+ # Symbolic links for old ids dylib for compatibility with ports that might be expecting them
+ ln -s libusbpp-legacy-0.1.4.dylib ${destroot}${prefix}/lib/libusb-legacy/libusbpp-legacy-0.1.4.4.4.dylib
+ ln -s libusb-legacy-0.1.4.dylib ${destroot}${prefix}/lib/libusb-legacy/libusb-legacy-0.1.4.4.4.dylib
}
livecheck.type regex
Deleted: trunk/dports/devel/libusb-legacy/files/patch-Makefile.in.diff
===================================================================
--- trunk/dports/devel/libusb-legacy/files/patch-Makefile.in.diff 2013-09-02 15:55:18 UTC (rev 110583)
+++ trunk/dports/devel/libusb-legacy/files/patch-Makefile.in.diff 2013-09-02 16:59:04 UTC (rev 110584)
@@ -1,11 +0,0 @@
---- Makefile.in.orig 2009-07-01 14:51:39.000000000 -0700
-+++ Makefile.in 2009-07-01 14:51:45.000000000 -0700
-@@ -257,7 +257,7 @@
- # gnu strictness chokes on README being autogenerated
- AUTOMAKE_OPTIONS = 1.4 foreign
- SUBDIRS = . tests doc
--AM_CFLAGS = -Werror $(AM_CFLAGS_EXT)
-+AM_CFLAGS = $(AM_CFLAGS_EXT)
- configincludedir = $(pkglibdir)/include
- bin_SCRIPTS = libusb-config
- EXTRA_DIST = LICENSE libusb.spec.in libusb.spec libusb-config.in README.in README \
Added: trunk/dports/devel/libusb-legacy/files/patch-configure.in.diff
===================================================================
--- trunk/dports/devel/libusb-legacy/files/patch-configure.in.diff (rev 0)
+++ trunk/dports/devel/libusb-legacy/files/patch-configure.in.diff 2013-09-02 16:59:04 UTC (rev 110584)
@@ -0,0 +1,13 @@
+--- configure.in.orig 2006-03-03 18:53:04.000000000 -0800
++++ configure.in 2013-09-02 09:25:36.000000000 -0700
+@@ -149,9 +149,8 @@ if test "x$enable_debug" = "xyes"; then
+ fi
+
+ # Checks for programs.
+-AC_LANG_CPLUSPLUS
+ AC_PROG_CC
+-AM_PROG_CC_C_O
++AC_PROG_CXX
+ AC_PROG_INSTALL
+
+ changequote(,)dnl
Added: trunk/dports/devel/libusb-legacy/files/rename.patch
===================================================================
--- trunk/dports/devel/libusb-legacy/files/rename.patch (rev 0)
+++ trunk/dports/devel/libusb-legacy/files/rename.patch 2013-09-02 16:59:04 UTC (rev 110584)
@@ -0,0 +1,313 @@
+--- Makefile.am 2006-03-03 18:52:46.000000000 -0800
++++ Makefile.am 2013-09-02 09:49:31.000000000 -0700
+@@ -10,18 +10,18 @@ AM_CFLAGS = -Werror
+
+ configincludedir = $(pkglibdir)/include
+
+-bin_SCRIPTS = libusb-config
++bin_SCRIPTS = libusb-legacy-config
+
+-libusb-config: libusb-config.in
++libusb-legacy-config: libusb-legacy-config.in
+
+-EXTRA_DIST = LICENSE libusb.spec.in libusb.spec libusb-config.in README.in README \
++EXTRA_DIST = LICENSE libusb.spec.in libusb.spec libusb-legacy-config.in README.in README \
+ INSTALL.libusb.in INSTALL.libusb Doxyfile apidocs/header.html \
+- apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
+-EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
++ apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb-legacy.pc.in
++EXTRA_libusb_legacy_la_SOURCE = linux.c linux.h bsd.c darwin.c
+
+-lib_LTLIBRARIES = libusb.la libusbpp.la
++lib_LTLIBRARIES = libusb-legacy.la libusbpp-legacy.la
+
+-pkgconfig_DATA = libusb.pc
++pkgconfig_DATA = libusb-legacy.pc
+
+ if LINUX_API
+ OS_SUPPORT = linux.c linux.h
+@@ -46,27 +46,27 @@ AM_CFLAGS += $(AM_CFLAGS_EXT)
+ AM_CPPFLAGS = -I.
+ AM_CXXFLAGS =
+
+-libusb_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT)
+-libusbpp_la_SOURCES = usbpp.cpp usbpp.h
++libusb_legacy_la_SOURCES = usb.c usbi.h error.c error.h descriptors.c $(OS_SUPPORT)
++libusbpp_legacy_la_SOURCES = usbpp.cpp usbpp.h
+
+-libusbpp_la_DEPENDENCIES = libusb.la
++libusbpp_legacy_la_DEPENDENCIES = libusb-legacy.la
+
+ # Do not add usb.h to *_SOURCES, regardless of dependencies.
+ # It would be added to the dist tarball, which it shouldn't be.
+ nodist_include_HEADERS = usb.h
+ include_HEADERS = usbpp.h
+
+-libusb_la_LDFLAGS = \
++libusb_legacy_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) \
+ -export-dynamic \
+ $(LDADDS) $(PREBIND_FLAGS)
+
+-libusbpp_la_LDFLAGS = \
++libusbpp_legacy_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) \
+ -export-dynamic \
+- $(LDADDS) -lusb $(PREBIND_FLAGSPP)
++ $(LDADDS) -lusb-legacy $(PREBIND_FLAGSPP)
+
+ .PHONY: files release snapshot
+
+--- configure.in 2006-03-03 18:53:04.000000000 -0800
++++ configure.in 2013-09-02 09:47:06.000000000 -0700
+@@ -250,14 +250,14 @@ AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+ libusb.spec
+- libusb-config
+- libusb.pc
++ libusb-legacy-config
++ libusb-legacy.pc
+ tests/Makefile
+ README
+ INSTALL.libusb
+ usb.h
+ Doxyfile
+ ])
+-AC_CONFIG_COMMANDS([default],[[chmod +x libusb-config]],[[]])
++AC_CONFIG_COMMANDS([default],[[chmod +x libusb-legacy-config]],[[]])
+ AC_OUTPUT
+
+--- libusb-config.in 2004-01-27 14:36:37.000000000 -0800
++++ libusb-config.in 1969-12-31 16:00:00.000000000 -0800
+@@ -1,79 +0,0 @@
+-#!/bin/sh
+-
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-exec_prefix_set=no
+-
+-usage()
+-{
+- cat <<EOF
+-Usage: libusb-config [OPTIONS] [LIBRARIES]
+-Options:
+- [--prefix[=DIR]]
+- [--exec-prefix[=DIR]]
+- [--version]
+- [--libs]
+- [--cflags]
+-EOF
+- exit $1
+-}
+-
+-if test $# -eq 0; then
+- usage 1 1>&2
+-fi
+-
+-while test $# -gt 0; do
+- case "$1" in
+- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+- *) optarg= ;;
+- esac
+-
+- case $1 in
+- --prefix=*)
+- prefix=$optarg
+- if test $exec_prefix_set = no ; then
+- exec_prefix=$optarg
+- fi
+- ;;
+- --prefix)
+- echo_prefix=yes
+- ;;
+- --exec-prefix=*)
+- exec_prefix=$optarg
+- exec_prefix_set=yes
+- ;;
+- --exec-prefix)
+- echo_exec_prefix=yes
+- ;;
+- --version)
+- echo @LIBUSB_VERSION@
+- exit 0
+- ;;
+- --cflags)
+- if test "@includedir@" != /usr/include ; then
+- includes="-I at includedir@"
+- fi
+- echo_cflags=yes
+- ;;
+- --libs)
+- echo_libs=yes
+- ;;
+- *)
+- usage 1 1>&2
+- ;;
+- esac
+- shift
+-done
+-
+-if test "$echo_prefix" = "yes"; then
+- echo $prefix
+-fi
+-if test "$echo_exec_prefix" = "yes"; then
+- echo $exec_prefix
+-fi
+-if test "$echo_cflags" = "yes"; then
+- echo $includes
+-fi
+-if test "$echo_libs" = "yes"; then
+- echo -L at libdir@ -lusb @OSLIBS@
+-fi
+--- libusb-legacy-config.in 1969-12-31 16:00:00.000000000 -0800
++++ libusb-legacy-config.in 2013-09-02 09:47:06.000000000 -0700
+@@ -0,0 +1,79 @@
++#!/bin/sh
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++exec_prefix_set=no
++
++usage()
++{
++ cat <<EOF
++Usage: libusb-legacy-config [OPTIONS] [LIBRARIES]
++Options:
++ [--prefix[=DIR]]
++ [--exec-prefix[=DIR]]
++ [--version]
++ [--libs]
++ [--cflags]
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++while test $# -gt 0; do
++ case "$1" in
++ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ *) optarg= ;;
++ esac
++
++ case $1 in
++ --prefix=*)
++ prefix=$optarg
++ if test $exec_prefix_set = no ; then
++ exec_prefix=$optarg
++ fi
++ ;;
++ --prefix)
++ echo_prefix=yes
++ ;;
++ --exec-prefix=*)
++ exec_prefix=$optarg
++ exec_prefix_set=yes
++ ;;
++ --exec-prefix)
++ echo_exec_prefix=yes
++ ;;
++ --version)
++ echo @LIBUSB_VERSION@
++ exit 0
++ ;;
++ --cflags)
++ if test "@includedir@" != /usr/include ; then
++ includes="-I at includedir@"
++ fi
++ echo_cflags=yes
++ ;;
++ --libs)
++ echo_libs=yes
++ ;;
++ *)
++ usage 1 1>&2
++ ;;
++ esac
++ shift
++done
++
++if test "$echo_prefix" = "yes"; then
++ echo $prefix
++fi
++if test "$echo_exec_prefix" = "yes"; then
++ echo $exec_prefix
++fi
++if test "$echo_cflags" = "yes"; then
++ echo $includes
++fi
++if test "$echo_libs" = "yes"; then
++ echo -L at libdir@ -lusb-legacy @OSLIBS@
++fi
+--- libusb-legacy.pc.in 1969-12-31 16:00:00.000000000 -0800
++++ libusb-legacy.pc.in 2013-09-02 09:47:03.000000000 -0700
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: libusb-legacy
++Description: USB access library
++Version: @VERSION@
++Libs: -L${libdir} -lusb-legacy
++Cflags: -I${includedir}
++
+--- libusb.pc.in 2005-02-14 12:46:42.000000000 -0800
++++ libusb.pc.in 1969-12-31 16:00:00.000000000 -0800
+@@ -1,11 +0,0 @@
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
+-
+-Name: libusb
+-Description: USB access library
+-Version: @VERSION@
+-Libs: -L${libdir} -lusb
+-Cflags: -I${includedir}
+-
+--- tests/Makefile.am 2006-01-19 15:25:05.000000000 -0800
++++ tests/Makefile.am 2013-09-02 09:47:05.000000000 -0700
+@@ -8,28 +8,28 @@ endif
+ noinst_PROGRAMS = testlibusb descriptor_test id_test find_hubs find_mice \
+ get_resolution hub_strings $(OS_SPECIFIC)
+
+-testlibusb_LDADD = $(top_builddir)/libusb.la @OSLIBS@
++testlibusb_LDADD = $(top_builddir)/libusb-legacy.la @OSLIBS@
+
+ descriptor_test_SOURCES = descriptor_test.cpp
+-descriptor_test_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++descriptor_test_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ id_test_SOURCES = id_test.cpp
+-id_test_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++id_test_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ find_hubs_SOURCES = find_hubs.cpp
+-find_hubs_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++find_hubs_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ find_mice_SOURCES = find_mice.cpp
+-find_mice_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++find_mice_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ get_resolution_SOURCES = get_resolution.cpp
+-get_resolution_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++get_resolution_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ hub_strings_SOURCES = hub_strings.cpp
+-hub_strings_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++hub_strings_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ driver_name_SOURCES = driver_name.cpp
+-driver_name_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
++driver_name_LDADD = $(top_builddir)/libusbpp-legacy.la @OSLIBS@
+
+ TESTS = testlibusb descriptor_test id_test find_hubs find_mice \
+ get_resolution hub_strings $(OS_SPECIFIC)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130902/d87ebb46/attachment.html>
More information about the macports-changes
mailing list