diff --git a/PKGBUILD b/PKGBUILD index 70d5fd1..9af7f65 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,20 +10,34 @@ url="https://web.archive.org/web/20110504183753/http://alumnit.ca:80/wiki/index. arch=('x86_64') license=('custom') depends=('wvstreams' 'ppp' 'gcc-libs') -makedepends=('lockdev') -options=('!makeflags' '!buildflags') -source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/${pkgname}-${pkgver}.tar.gz") -sha512sums=('e949632583d889ad040c284f42c46790d247fffbc2d5e926c4b5836c970002f07741d26d052489bdc9c8144dcbb62a12851a3c275a5cecd5393d2722f43bb49a') +source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/${pkgname}-${pkgver}.tar.gz" + 'wvdial-1.61-destdir.patch' + 'wvdial-1.61-parallel-make.patch' + 'wvdial-1.61-as-needed.patch' + 'wvdial-1.61-use_DEFAULT_SOURCE.patch') +sha512sums=('e949632583d889ad040c284f42c46790d247fffbc2d5e926c4b5836c970002f07741d26d052489bdc9c8144dcbb62a12851a3c275a5cecd5393d2722f43bb49a' + '6f1394922aa75ab97e7a589935157ac2f15ed79cf90fa4a2e3bfa0dbe60a6c3a8e072b152c292d1ff02352c2c230a692d35fe23723e3a8c98558db441f49fa22' + 'bc8f425b0ca6511729bbe0d3b57d39bbc0fb08aa544d97ba577bc07b67bce3502fcdf86c4e298641e0d61a1432f05aa9dcc7cf3e728daa42944a50363cf2d6b6' + '5913c99a613344566e06c2cbb7402a1e2e92cb34c5eb8cfbef5e105107b6b2a04d067fcf93063ea6afcedacb2099ce8985b197b976877a851301587822d8f495' + '7bb8b84b3eab8256c8f9f27a875c81a1504fd1c39d17ec26c28f7404c9f5e1ece15febc4ee1ac6e4e7301110ff99f11cb4b5548474b5c68ffd2ecc0c1007e6f4') + +prepare() { + cd "${srcdir}"/${pkgname}-${pkgver} + patch -p1 -i ../wvdial-1.61-destdir.patch + patch -p1 -i ../wvdial-1.61-as-needed.patch + patch -p1 -i ../wvdial-1.61-parallel-make.patch + patch -p1 -i ../wvdial-1.61-use_DEFAULT_SOURCE.patch +} build() { cd "${srcdir}"/${pkgname}-${pkgver} ./configure - make LOCKDEV="-llockdev" + make } package() { cd "${srcdir}"/${pkgname}-${pkgver} - make prefix="${pkgdir}"/usr PPPDIR="${pkgdir}"/etc/ppp/peers install + make DESTDIR="${pkgdir}" install install -Dm644 COPYING.LIB "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } diff --git a/wvdial-1.61-as-needed.patch b/wvdial-1.61-as-needed.patch new file mode 100644 index 0000000..06c3ddd --- /dev/null +++ b/wvdial-1.61-as-needed.patch @@ -0,0 +1,15 @@ +--- wvdial-1.60/Makefile.in 2008-12-14 17:18:25.000000000 +0100 ++++ wvdial-1.60/Makefile.in 2008-12-14 17:20:13.000000000 +0100 +@@ -15,10 +15,12 @@ + ifeq ($(PC_LIBS),) + $(error WvStreams does not appear to be installed) + endif + LIBS+=$(PC_LIBS) + ++wvdial-LIBS+= -luniconf ++ + BINDIR=${prefix}/bin + MANDIR=${prefix}/share/man + PPPDIR=${DESTDIR}/etc/ppp/peers + + include wvrules.mk diff --git a/wvdial-1.61-destdir.patch b/wvdial-1.61-destdir.patch new file mode 100644 index 0000000..ceea400 --- /dev/null +++ b/wvdial-1.61-destdir.patch @@ -0,0 +1,35 @@ +=== modified file 'Makefile.in' +--- a/Makefile.in 2010-05-27 13:08:26 +0000 ++++ b/Makefile.in 2010-05-27 13:08:41 +0000 +@@ -3,7 +3,7 @@ + WVPACKAGE_TARNAME=@PACKAGE_TARNAME@ + WVPACKAGE_VERSION=@PACKAGE_VERSION@ + +-prefix=/usr/local ++prefix=${DESTDIR}/usr + WVSTREAMS_INC= + WVSTREAMS_LIB= + WVSTREAMS_BIN=$(prefix)/bin +@@ -23,7 +23,7 @@ + + BINDIR=${prefix}/bin + MANDIR=${prefix}/share/man +-PPPDIR=/etc/ppp/peers ++PPPDIR=${DESTDIR}/etc/ppp/peers + + include wvrules.mk + + +=== modified file 'config.defaults.mk' +--- a/config.defaults.mk 2010-05-27 13:08:26 +0000 ++++ b/config.defaults.mk 2010-05-27 13:43:03 +0000 +@@ -13,7 +13,7 @@ + LIBS_PAM=-lpam + LIBS_TCL= + +-prefix=/usr/local ++prefix=${DESTDIR}/usr + datadir=${prefix}/share + includedir=${prefix}/include + infodir=${prefix}/share/info + diff --git a/wvdial-1.61-parallel-make.patch b/wvdial-1.61-parallel-make.patch new file mode 100644 index 0000000..4c0c837 --- /dev/null +++ b/wvdial-1.61-parallel-make.patch @@ -0,0 +1,20 @@ +--- wvdial-1.61/wvrules-posix.mk ++++ wvdial-1.61/wvrules-posix.mk +@@ -85,12 +85,15 @@ + $(AR) s $1 + endef + +-CC: FORCE ++CC: + @CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS_SRC)/gen-cc CC c + +-CXX: FORCE ++CXX: + @CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS_SRC)/gen-cc CXX cc + ++#All files must depend on the above two rules. This is a godawful hack. ++$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX ++ + wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS) diff --git a/wvdial-1.61-use_DEFAULT_SOURCE.patch b/wvdial-1.61-use_DEFAULT_SOURCE.patch new file mode 100644 index 0000000..96bf051 --- /dev/null +++ b/wvdial-1.61-use_DEFAULT_SOURCE.patch @@ -0,0 +1,13 @@ +Index: wvdial-1.61/wvrules.mk +=================================================================== +--- wvdial-1.61.orig/wvrules.mk ++++ wvdial-1.61/wvrules.mk +@@ -71,7 +71,7 @@ runtests: + + INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH)) + CPPFLAGS+=$(INCFLAGS) \ +- -D_BSD_SOURCE -D_GNU_SOURCE $(OSDEFINE) \ ++ -D_DEFAULT_SOURCE -D_GNU_SOURCE $(OSDEFINE) \ + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ + -DUNSTABLE +