diff options
author | shurd <shurd@FreeBSD.org> | 2014-06-28 03:59:47 +0800 |
---|---|---|
committer | shurd <shurd@FreeBSD.org> | 2014-06-28 03:59:47 +0800 |
commit | ed0acbdbd8380bc8505b9819866924a9fea32b87 (patch) | |
tree | 6d0abd2c4ddd20ed1b09c14799b937747def1eab | |
parent | 1202916b287a28cda01a6d5a1336ce9458279fef (diff) | |
download | freebsd-ports-gnome-ed0acbdbd8380bc8505b9819866924a9fea32b87.tar.gz freebsd-ports-gnome-ed0acbdbd8380bc8505b9819866924a9fea32b87.tar.zst freebsd-ports-gnome-ed0acbdbd8380bc8505b9819866924a9fea32b87.zip |
- STAGEify
- Make build with Clang
- Add LICENSE
- USES_GNOME=gnomehack -> USES=pathfix
- Bump PORTREVISION
PR: 191241
Submitted by: shurd
Reviewed by: skreuzer
Approved by: db, skreuzer (mentors)
-rw-r--r-- | comms/gmfsk/Makefile | 13 | ||||
-rw-r--r-- | comms/gmfsk/files/extra-patch-misc_misc.h | 20 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-Makfile.in | 11 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-help_gmfsk_C_Makefile.in | 10 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-src_misc_cmplx.h | 181 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-src_misc_filter-i386.h | 42 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-src_misc_filter.h | 22 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-src_misc_misc.c (renamed from comms/gmfsk/files/extra-patch-misc_misc.c) | 6 | ||||
-rw-r--r-- | comms/gmfsk/files/patch-src_misc_misc.h | 235 |
9 files changed, 511 insertions, 29 deletions
diff --git a/comms/gmfsk/Makefile b/comms/gmfsk/Makefile index 70a215e1e228..48d784f1fa7e 100644 --- a/comms/gmfsk/Makefile +++ b/comms/gmfsk/Makefile @@ -6,20 +6,23 @@ PORTVERSION= 0.6 PORTREVISION= 12 CATEGORIES= comms audio hamradio MASTER_SITES= http://gmfsk.connect.fi/ \ + http://he.fi/pub/ham/unix/linux/hfmodems/ \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= db MAINTAINER= carl@stagecraft.cx COMMENT= The Gnome MFSK terminal program +LICENSE= GPLv2 + LIB_DEPENDS= libfftw.so:${PORTSDIR}/math/fftw GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib +LDFLAGS+= -L${LOCALBASE}/lib USES_CSTD= gnu89 -USES= gmake pkgconfig -USE_GNOME= libgnomeui gnomehack gnomeprefix +USES= gmake pkgconfig pathfix +USE_GNOME= libgnomeui gnomeprefix INSTALLS_OMF= yes GCONF_SCHEMAS= gmfsk.schemas @@ -28,7 +31,6 @@ OPTIONS_DEFINE= HAMLIB HAMLIB_DESC= Enable HAMLIB Support OPTIONS_DEFAULT= HAMLIB -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${PORT_OPTIONS:MHAMLIB} @@ -40,8 +42,7 @@ CONFIGURE_ARGS+= --disable-hamlib .endif .if ( ${OSVERSION} >= 802502 && ${OSVERSION} < 900000 ) || ${OSVERSION} >= 900027 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-misc_misc.c -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-misc_misc.h +CPPFLAGS+= -DFBSD_HAS_LOG2 .endif post-patch: diff --git a/comms/gmfsk/files/extra-patch-misc_misc.h b/comms/gmfsk/files/extra-patch-misc_misc.h deleted file mode 100644 index 944ceb0f442f..000000000000 --- a/comms/gmfsk/files/extra-patch-misc_misc.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/misc/misc.h.orig 2004-04-13 07:45:19.000000000 -0500 -+++ src/misc/misc.h 2012-06-22 20:41:11.000000000 -0500 -@@ -102,7 +102,7 @@ - } - - /* ---------------------------------------------------------------------- */ -- -+#if 0 - /* - * Integer base-2 logarithm - */ -@@ -119,7 +119,7 @@ - - return y; - } -- -+#endif - /* ---------------------------------------------------------------------- */ - - /* diff --git a/comms/gmfsk/files/patch-Makfile.in b/comms/gmfsk/files/patch-Makfile.in new file mode 100644 index 000000000000..13117257f427 --- /dev/null +++ b/comms/gmfsk/files/patch-Makfile.in @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2014-06-24 21:35:13.000000000 -0700 ++++ Makefile.in 2014-06-24 21:35:24.000000000 -0700 +@@ -598,8 +598,6 @@ + fi \ + done \ + fi +- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +- $(GCONFTOOL) --makefile-install-rule $(top_builddir)/gmfsk.schemas + + dist-hook: + if test -d pixmaps; then \ diff --git a/comms/gmfsk/files/patch-help_gmfsk_C_Makefile.in b/comms/gmfsk/files/patch-help_gmfsk_C_Makefile.in new file mode 100644 index 000000000000..cbc225933ff6 --- /dev/null +++ b/comms/gmfsk/files/patch-help_gmfsk_C_Makefile.in @@ -0,0 +1,10 @@ +--- help/gmfsk/C/Makefile.in.orig 2014-06-24 21:40:46.000000000 -0700 ++++ help/gmfsk/C/Makefile.in 2014-06-24 21:40:55.000000000 -0700 +@@ -383,7 +383,6 @@ + for file in $(omffile); do \ + $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \ + done +- -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) + + uninstall-local-omf: + -for file in $(srcdir)/*.omf; do \ diff --git a/comms/gmfsk/files/patch-src_misc_cmplx.h b/comms/gmfsk/files/patch-src_misc_cmplx.h new file mode 100644 index 000000000000..41fa3258d776 --- /dev/null +++ b/comms/gmfsk/files/patch-src_misc_cmplx.h @@ -0,0 +1,181 @@ +--- src/misc/cmplx.h.orig 2004-06-22 14:43:31.000000000 -0700 ++++ src/misc/cmplx.h 2014-06-21 03:17:56.000000000 -0700 +@@ -40,10 +40,19 @@ + + typedef fftw_complex complex; + ++#ifdef __OPTIMIZE__ ++#define INLINE_EXTERN static inline ++#else ++#define INLINE_EXTERN extern ++#endif ++ + /* + * Complex multiplication. + */ +-extern __inline__ complex cmul(complex x, complex y) ++INLINE_EXTERN complex cmul(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + +@@ -52,11 +61,15 @@ + + return z; + } ++#endif + + /* + * Complex addition. + */ +-extern __inline__ complex cadd(complex x, complex y) ++INLINE_EXTERN complex cadd(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + +@@ -65,11 +78,15 @@ + + return z; + } ++#endif + + /* + * Complex subtraction. + */ +-extern __inline__ complex csub(complex x, complex y) ++INLINE_EXTERN complex csub(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + +@@ -78,11 +95,15 @@ + + return z; + } ++#endif + + /* + * Complex multiply-accumulate. + */ +-extern __inline__ complex cmac(complex *a, complex *b, int ptr, int len) ++INLINE_EXTERN complex cmac(complex *a, complex *b, int ptr, int len) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + int i; +@@ -99,12 +120,16 @@ + + return z; + } ++#endif + + /* + * Complex ... yeah, what??? Returns a complex number that has the + * properties: |z| = |x| * |y| and arg(z) = arg(y) - arg(x) + */ +-extern __inline__ complex ccor(complex x, complex y) ++INLINE_EXTERN complex ccor(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + +@@ -113,51 +138,75 @@ + + return z; + } ++#endif + + /* + * Real part of the complex ??? + */ +-extern __inline__ double ccorI(complex x, complex y) ++INLINE_EXTERN double ccorI(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return c_re(x) * c_re(y) + c_im(x) * c_im(y); + } ++#endif + + /* + * Imaginary part of the complex ??? + */ +-extern __inline__ double ccorQ(complex x, complex y) ++INLINE_EXTERN double ccorQ(complex x, complex y) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return c_re(x) * c_im(y) - c_im(x) * c_re(y); + } ++#endif + + /* + * Modulo (absolute value) of a complex number. + */ +-extern __inline__ double cmod(complex x) ++INLINE_EXTERN double cmod(complex x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return sqrt(c_re(x) * c_re(x) + c_im(x) * c_im(x)); + } ++#endif + + /* + * Square of the absolute value (power). + */ +-extern __inline__ double cpwr(complex x) ++INLINE_EXTERN double cpwr(complex x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return (c_re(x) * c_re(x) + c_im(x) * c_im(x)); + } ++#endif + + /* + * Argument of a complex number. + */ +-extern __inline__ double carg(complex x) ++INLINE_EXTERN double carg(complex x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return atan2(c_im(x), c_re(x)); + } ++#endif + + /* + * Complex square root. + */ +-extern __inline__ complex csqrt(complex x) ++INLINE_EXTERN complex csqrt(complex x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + complex z; + +@@ -166,5 +215,6 @@ + + return z; + } ++#endif + + #endif diff --git a/comms/gmfsk/files/patch-src_misc_filter-i386.h b/comms/gmfsk/files/patch-src_misc_filter-i386.h new file mode 100644 index 000000000000..77dc5b39be75 --- /dev/null +++ b/comms/gmfsk/files/patch-src_misc_filter-i386.h @@ -0,0 +1,42 @@ +--- src/misc/filter-i386.h.orig 2004-06-16 13:32:13.000000000 -0700 ++++ src/misc/filter-i386.h 2014-06-21 03:22:13.000000000 -0700 +@@ -32,7 +32,16 @@ + + #include <stdio.h> + +-extern inline float __mac_g(const float *a, const float *b, unsigned int size) ++#ifdef __OPTIMIZE__ ++#define INLINE_EXTERN static inline ++#else ++#define INLINE_EXTERN extern ++#endif ++ ++INLINE_EXTERN float __mac_g(const float *a, const float *b, unsigned int size) ++#ifndef __OPTIMIZE__ ++; ++#else + { + float sum = 0; + unsigned int i; +@@ -41,8 +50,12 @@ + sum += (*a++) * (*b++); + return sum; + } ++#endif + +-extern inline float __mac_c(const float *a, const float *b, unsigned int size) ++INLINE_EXTERN float __mac_c(const float *a, const float *b, unsigned int size) ++#ifndef __OPTIMIZE__ ++; ++#else + { + float f; + +@@ -971,6 +984,7 @@ + return __mac_g(a, b, size); + } + } ++#endif + + /* ---------------------------------------------------------------------- */ + #endif /* _FILTER_I386_H */ diff --git a/comms/gmfsk/files/patch-src_misc_filter.h b/comms/gmfsk/files/patch-src_misc_filter.h new file mode 100644 index 000000000000..83d481fc42fd --- /dev/null +++ b/comms/gmfsk/files/patch-src_misc_filter.h @@ -0,0 +1,22 @@ +--- src/misc/filter.h.orig 2004-04-13 05:43:45.000000000 -0700 ++++ src/misc/filter.h 2014-06-21 03:16:02.000000000 -0700 +@@ -39,7 +39,10 @@ + + + #ifndef __HAVE_ARCH_MAC +-extern __inline__ float mac(const float *a, const float *b, unsigned int size) ++INLINE_EXTERN float mac(const float *a, const float *b, unsigned int size) ++#ifndef __OPTIMIZE__ ++; ++#else + { + float sum = 0; + unsigned int i; +@@ -48,6 +51,7 @@ + sum += (*a++) * (*b++); + return sum; + } ++#endif + #endif /* __HAVE_ARCH_MAC */ + + #endif /* __OPTIMIZE__ */ diff --git a/comms/gmfsk/files/extra-patch-misc_misc.c b/comms/gmfsk/files/patch-src_misc_misc.c index 659155b3e737..9796be1e2b7d 100644 --- a/comms/gmfsk/files/extra-patch-misc_misc.c +++ b/comms/gmfsk/files/patch-src_misc_misc.c @@ -1,11 +1,11 @@ ---- src/misc/misc.c.orig 2004-04-13 07:49:04.000000000 -0500 -+++ src/misc/misc.c 2012-06-22 20:40:53.000000000 -0500 +--- src/misc/misc.c.orig 2004-04-13 05:49:04.000000000 -0700 ++++ src/misc/misc.c 2014-06-21 02:32:50.000000000 -0700 @@ -101,7 +101,7 @@ } /* ---------------------------------------------------------------------- */ - -+#if 0 ++#ifndef FBSD_HAS_LOG2 /* * Integer base-2 logarithm */ diff --git a/comms/gmfsk/files/patch-src_misc_misc.h b/comms/gmfsk/files/patch-src_misc_misc.h new file mode 100644 index 000000000000..53ef4d3d1068 --- /dev/null +++ b/comms/gmfsk/files/patch-src_misc_misc.h @@ -0,0 +1,235 @@ +--- src/misc/misc.h.orig 2004-04-13 05:45:19.000000000 -0700 ++++ src/misc/misc.h 2014-06-21 03:17:38.000000000 -0700 +@@ -27,12 +27,21 @@ + + #include <math.h> + ++#ifdef __OPTIMIZE__ ++#define INLINE_EXTERN static inline ++#else ++#define INLINE_EXTERN extern ++#endif ++ + /* ---------------------------------------------------------------------- */ + + /* + * Hamming weight (number of bits that are ones). + */ +-extern inline unsigned int hweight32(unsigned int w) ++INLINE_EXTERN unsigned int hweight32(unsigned int w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = (w & 0x55555555) + ((w >> 1) & 0x55555555); + w = (w & 0x33333333) + ((w >> 2) & 0x33333333); +@@ -41,8 +50,12 @@ + w = (w & 0x0000FFFF) + ((w >> 16) & 0x0000FFFF); + return w; + } ++#endif + +-extern inline unsigned int hweight16(unsigned short w) ++INLINE_EXTERN unsigned int hweight16(unsigned short w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = (w & 0x5555) + ((w >> 1) & 0x5555); + w = (w & 0x3333) + ((w >> 2) & 0x3333); +@@ -50,31 +63,43 @@ + w = (w & 0x00FF) + ((w >> 8) & 0x00FF); + return w; + } ++#endif + +-extern inline unsigned int hweight8(unsigned char w) ++INLINE_EXTERN unsigned int hweight8(unsigned char w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = (w & 0x55) + ((w >> 1) & 0x55); + w = (w & 0x33) + ((w >> 2) & 0x33); + w = (w & 0x0F) + ((w >> 4) & 0x0F); + return w; + } ++#endif + + /* ---------------------------------------------------------------------- */ + + /* + * Parity function. Return one if `w' has odd number of ones, zero otherwise. + */ +-extern inline int parity(unsigned int w) ++INLINE_EXTERN int parity(unsigned int w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return hweight32(w) & 1; + } ++#endif + + /* ---------------------------------------------------------------------- */ + + /* + * Reverse order of bits. + */ +-extern inline unsigned int rbits32(unsigned int w) ++INLINE_EXTERN unsigned int rbits32(unsigned int w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = ((w >> 1) & 0x55555555) | ((w << 1) & 0xAAAAAAAA); + w = ((w >> 2) & 0x33333333) | ((w << 2) & 0xCCCCCCCC); +@@ -83,8 +108,12 @@ + w = ((w >> 16) & 0x0000FFFF) | ((w << 16) & 0xFFFF0000); + return w; + } ++#endif + +-extern inline unsigned short rbits16(unsigned short w) ++INLINE_EXTERN unsigned short rbits16(unsigned short w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = ((w >> 1) & 0x5555) | ((w << 1) & 0xAAAA); + w = ((w >> 2) & 0x3333) | ((w << 2) & 0xCCCC); +@@ -92,21 +121,29 @@ + w = ((w >> 8) & 0x00FF) | ((w << 8) & 0xFF00); + return w; + } ++#endif + +-extern inline unsigned char rbits8(unsigned char w) ++INLINE_EXTERN unsigned char rbits8(unsigned char w) ++#ifndef __OPTIMIZE__ ++; ++#else + { + w = ((w >> 1) & 0x55) | ((w << 1) & 0xFF); + w = ((w >> 2) & 0x33) | ((w << 2) & 0xCC); + w = ((w >> 4) & 0x0F) | ((w << 4) & 0xF0); + return w; + } ++#endif + + /* ---------------------------------------------------------------------- */ +- ++#ifndef FBSD_HAS_LOG2 + /* + * Integer base-2 logarithm + */ +-extern inline int log2(unsigned int x) ++INLINE_EXTERN int log2(unsigned int x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + int y = 0; + +@@ -119,13 +156,17 @@ + + return y; + } +- ++#endif ++#endif + /* ---------------------------------------------------------------------- */ + + /* + * Gray encoding and decoding (8 bit) + */ +-extern inline unsigned char grayencode(unsigned char data) ++INLINE_EXTERN unsigned char grayencode(unsigned char data) ++#ifndef __OPTIMIZE__ ++; ++#else + { + unsigned char bits = data; + +@@ -139,50 +180,75 @@ + + return bits; + } ++#endif + +-extern inline unsigned char graydecode(unsigned char data) ++INLINE_EXTERN unsigned char graydecode(unsigned char data) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return data ^ (data >> 1); + } ++#endif + + /* ---------------------------------------------------------------------- */ + + /* + * Hamming window function + */ +-extern inline double hamming(double x) ++INLINE_EXTERN double hamming(double x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return 0.54 - 0.46 * cos(2 * M_PI * x); + } ++#endif + + /* ---------------------------------------------------------------------- */ + + /* + * Sinc etc... + */ +-extern inline double sinc(double x) ++INLINE_EXTERN double sinc(double x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return (fabs(x) < 1e-10) ? 1.0 : (sin(M_PI * x) / (M_PI * x)); + } ++#endif + +-extern inline double cosc(double x) ++INLINE_EXTERN double cosc(double x) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return (fabs(x) < 1e-10) ? 0.0 : ((1.0 - cos(M_PI * x)) / (M_PI * x)); + } ++#endif + + /* ---------------------------------------------------------------------- */ + +-extern inline float clamp(float x, float min, float max) ++INLINE_EXTERN float clamp(float x, float min, float max) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return (x < min) ? min : ((x > max) ? max : x); + } ++#endif + + /* ---------------------------------------------------------------------- */ + +-extern inline float decayavg(float average, float input, float weight) ++INLINE_EXTERN float decayavg(float average, float input, float weight) ++#ifndef __OPTIMIZE__ ++; ++#else + { + return input * (1.0 / weight) + average * (1.0 - (1.0 / weight)); + } ++#endif + + /* ---------------------------------------------------------------------- */ + |