diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 891ba7d..3fbf538 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -7,19 +7,27 @@ pkgrel=6 pkgdesc="Drivers and tools to support ATM networking under Linux." arch=('x86_64') depends=('glibc') +optdepends=('flex: for atmsigd') url="http://linux-atm.sourceforge.net/" license=(GPL) source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz - man-pages.patch remove-define-hacks.patch) + linux-atm-man-pages.patch + linux-atm-remove-define-hacks.patch + linux-atm-linux-5.2-SIOCGSTAMP.patch + linux-atm-string-formatting.patch) options=(!makeflags) md5sums=('d49499368c3cf15f73a05d9bce8824a8' '181390736336cdb615ae32f1ae5acfa6' - '74275ad95cef3898ef3ec52c21012e45') + '74275ad95cef3898ef3ec52c21012e45' + 'a5a44b282461e6530ad8db0f032bf3d5' + 'b08a6e98ffac0f2870be7f3a60948c5f') prepare() { cd "${pkgname}-${pkgver}" - patch -Np1 -i ../man-pages.patch - patch -Np1 -i ../remove-define-hacks.patch + patch -Np1 -i ../linux-atm-man-pages.patch + patch -Np1 -i ../linux-atm-remove-define-hacks.patch + patch -Np1 -i ../linux-atm-linux-5.2-SIOCGSTAMP.patch + patch -Np1 -i ../linux-atm-string-formatting.patch # install firmware in /usr/lib sed -i "s#/lib/firmware#/usr/lib/firmware#" src/extra/Makefile.in diff --git a/trunk/linux-atm-linux-5.2-SIOCGSTAMP.patch b/trunk/linux-atm-linux-5.2-SIOCGSTAMP.patch new file mode 100644 index 0000000..ff91c7f --- /dev/null +++ b/trunk/linux-atm-linux-5.2-SIOCGSTAMP.patch @@ -0,0 +1,41 @@ +Fix build failure against linux-5.2+: + https://www.spinics.net/lists/linux-sh/msg53430.html + +--- a/src/maint/atmdump.c ++++ b/src/maint/atmdump.c +@@ -17,6 +17,16 @@ + #include /* for htonl and ntohl */ + #include + ++#ifndef SIOCGSTAMP ++/* linux-5.2+ added support for 64-bit time_t into ioctls ++ that support 'struct timeval' and removed 'SIOCGSTAMP' ++ define. ++ ++ Include 'SIOCGSTAMP' wrapper via linux/sockios.h ++ if does not exist. ++ */ ++# include ++#endif + + static const char *pti[] = { "Data SDU 0","Data SDU 1","Data SDU 0, CE", + "Data SDU 1, CE","Segment OAM F5","End-to-end OAM F5","Reserved (RM)", +--- a/src/maint/saaldump.c ++++ b/src/maint/saaldump.c +@@ -24,6 +24,16 @@ + + #define MAX_ITEM 2048 /* longest string emitted by q.dump */ + ++#ifndef SIOCGSTAMP ++/* linux-5.2+ added support for 64-bit time_t into ioctls ++ that support 'struct timeval' and removed 'SIOCGSTAMP' ++ define. ++ ++ Include 'SIOCGSTAMP' wrapper via linux/sockios.h ++ if does not exist. ++ */ ++# include ++#endif + + static int interval = 0; /* display absolute time by default */ + static int quiet = 0; /* decode Q.2931 messages by default */ diff --git a/trunk/linux-atm-man-pages.patch b/trunk/linux-atm-man-pages.patch new file mode 100644 index 0000000..c504cfe --- /dev/null +++ b/trunk/linux-atm-man-pages.patch @@ -0,0 +1,45 @@ +diff -up linux-atm-2.5.1/src/led/zeppelin.8.fixman linux-atm-2.5.1/src/led/zeppelin.8 +--- linux-atm-2.5.1/src/led/zeppelin.8.fixman 2003-05-02 19:35:04.000000000 +0200 ++++ linux-atm-2.5.1/src/led/zeppelin.8 2010-10-13 12:58:18.000000000 +0200 +@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using + recommended. Token Ring support has received less testing than its + Ethernet counterpart. + .SH FILES +-.IP \fI/var/run/lec[interface number].pid\fP ++\fI/var/run/lec[interface number].pid\fP + The file containing the process id of zeppelin. + .SH BUGS + John Bonham died 1980 and Led Zeppelin broke. +diff -up linux-atm-2.5.1/src/mpoad/mpcd.8.fixman linux-atm-2.5.1/src/mpoad/mpcd.8 +--- linux-atm-2.5.1/src/mpoad/mpcd.8.fixman 2001-10-10 00:33:07.000000000 +0200 ++++ linux-atm-2.5.1/src/mpoad/mpcd.8 2010-10-13 12:59:14.000000000 +0200 +@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A + .B ]] + .SH DESCRIPTION + MPOA client +-.SM(MPC) is responsible for creating and receiving ++.SM (MPC) is responsible for creating and receiving + internetwork layer shortcuts. Using these shortcuts MPCs forward + unicast internetwork layer packets effectively over ATM without need + for routing protocols. +@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o + shortcuts is done with the help of + .SM MPOA + server +-.SM(MPS). ++.SM (MPS). + .PP + Just as the Linux + .SM LAN +diff -up linux-atm-2.5.1/src/sigd/atmsigd.conf.4.fixman linux-atm-2.5.1/src/sigd/atmsigd.conf.4 +--- linux-atm-2.5.1/src/sigd/atmsigd.conf.4.fixman 2001-10-10 00:33:07.000000000 +0200 ++++ linux-atm-2.5.1/src/sigd/atmsigd.conf.4 2010-10-13 12:58:49.000000000 +0200 +@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e + .P + If an option is specified in \fBatmsigd.conf\fP and on the command + line, the command line has priority. +-.COMPATIBILITY ++.SH COMPATIBILITY + Certain options used by past versions of \fBatmsigd\fP but no longer documented + on the man page are still recognized and supported, but they also yield a + warning message. Future versions of \fBatmsigd\fP will not recognize those diff --git a/trunk/linux-atm-remove-define-hacks.patch b/trunk/linux-atm-remove-define-hacks.patch new file mode 100644 index 0000000..cfac43c --- /dev/null +++ b/trunk/linux-atm-remove-define-hacks.patch @@ -0,0 +1,22 @@ +diff -up linux-atm-2.5.1/src/arpd/arp.c.ftbfs linux-atm-2.5.1/src/arpd/arp.c +--- linux-atm-2.5.1/src/arpd/arp.c.ftbfs 2007-07-11 11:27:15.000000000 -0400 ++++ linux-atm-2.5.1/src/arpd/arp.c 2019-05-02 20:15:45.497338836 -0400 +@@ -15,7 +15,6 @@ + #include + #include /* for linux/if_arp.h */ + #include /* for ntohs, etc. */ +-#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */ + #include + #include + #include +diff -up linux-atm-2.5.1/src/arpd/itf.c.ftbfs linux-atm-2.5.1/src/arpd/itf.c +--- linux-atm-2.5.1/src/arpd/itf.c.ftbfs 2007-07-11 11:27:15.000000000 -0400 ++++ linux-atm-2.5.1/src/arpd/itf.c 2019-05-02 20:19:08.046499027 -0400 +@@ -12,7 +12,6 @@ + #include + #include + #include +-#define _LINUX_NETDEVICE_H /* glibc2 */ + #include + #include + diff --git a/trunk/linux-atm-string-formatting.patch b/trunk/linux-atm-string-formatting.patch new file mode 100644 index 0000000..17aaf57 --- /dev/null +++ b/trunk/linux-atm-string-formatting.patch @@ -0,0 +1,11 @@ +--- linux-atm-2.5.1-orig/src/test/ttcp.c 2017-05-28 12:16:24.984611487 +0000 ++++ linux-atm-2.5.1/src/test/ttcp.c 2017-05-28 12:17:25.370338343 +0000 +@@ -663,7 +663,7 @@ int no_check = 0; + exit(0); + + usage: +- fprintf(stderr, Usage); ++ fprintf(stderr, "%s", Usage); + exit(1); + } + diff --git a/trunk/man-pages.patch b/trunk/man-pages.patch deleted file mode 100644 index c504cfe..0000000 --- a/trunk/man-pages.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up linux-atm-2.5.1/src/led/zeppelin.8.fixman linux-atm-2.5.1/src/led/zeppelin.8 ---- linux-atm-2.5.1/src/led/zeppelin.8.fixman 2003-05-02 19:35:04.000000000 +0200 -+++ linux-atm-2.5.1/src/led/zeppelin.8 2010-10-13 12:58:18.000000000 +0200 -@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using - recommended. Token Ring support has received less testing than its - Ethernet counterpart. - .SH FILES --.IP \fI/var/run/lec[interface number].pid\fP -+\fI/var/run/lec[interface number].pid\fP - The file containing the process id of zeppelin. - .SH BUGS - John Bonham died 1980 and Led Zeppelin broke. -diff -up linux-atm-2.5.1/src/mpoad/mpcd.8.fixman linux-atm-2.5.1/src/mpoad/mpcd.8 ---- linux-atm-2.5.1/src/mpoad/mpcd.8.fixman 2001-10-10 00:33:07.000000000 +0200 -+++ linux-atm-2.5.1/src/mpoad/mpcd.8 2010-10-13 12:59:14.000000000 +0200 -@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A - .B ]] - .SH DESCRIPTION - MPOA client --.SM(MPC) is responsible for creating and receiving -+.SM (MPC) is responsible for creating and receiving - internetwork layer shortcuts. Using these shortcuts MPCs forward - unicast internetwork layer packets effectively over ATM without need - for routing protocols. -@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o - shortcuts is done with the help of - .SM MPOA - server --.SM(MPS). -+.SM (MPS). - .PP - Just as the Linux - .SM LAN -diff -up linux-atm-2.5.1/src/sigd/atmsigd.conf.4.fixman linux-atm-2.5.1/src/sigd/atmsigd.conf.4 ---- linux-atm-2.5.1/src/sigd/atmsigd.conf.4.fixman 2001-10-10 00:33:07.000000000 +0200 -+++ linux-atm-2.5.1/src/sigd/atmsigd.conf.4 2010-10-13 12:58:49.000000000 +0200 -@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e - .P - If an option is specified in \fBatmsigd.conf\fP and on the command - line, the command line has priority. --.COMPATIBILITY -+.SH COMPATIBILITY - Certain options used by past versions of \fBatmsigd\fP but no longer documented - on the man page are still recognized and supported, but they also yield a - warning message. Future versions of \fBatmsigd\fP will not recognize those diff --git a/trunk/remove-define-hacks.patch b/trunk/remove-define-hacks.patch deleted file mode 100644 index cfac43c..0000000 --- a/trunk/remove-define-hacks.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up linux-atm-2.5.1/src/arpd/arp.c.ftbfs linux-atm-2.5.1/src/arpd/arp.c ---- linux-atm-2.5.1/src/arpd/arp.c.ftbfs 2007-07-11 11:27:15.000000000 -0400 -+++ linux-atm-2.5.1/src/arpd/arp.c 2019-05-02 20:15:45.497338836 -0400 -@@ -15,7 +15,6 @@ - #include - #include /* for linux/if_arp.h */ - #include /* for ntohs, etc. */ --#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */ - #include - #include - #include -diff -up linux-atm-2.5.1/src/arpd/itf.c.ftbfs linux-atm-2.5.1/src/arpd/itf.c ---- linux-atm-2.5.1/src/arpd/itf.c.ftbfs 2007-07-11 11:27:15.000000000 -0400 -+++ linux-atm-2.5.1/src/arpd/itf.c 2019-05-02 20:19:08.046499027 -0400 -@@ -12,7 +12,6 @@ - #include - #include - #include --#define _LINUX_NETDEVICE_H /* glibc2 */ - #include - #include -