aboutsummaryrefslogtreecommitdiff
path: root/comms/unixcw
diff options
context:
space:
mode:
authorDiane Bruce <db@FreeBSD.org>2013-12-28 22:18:48 +0000
committerDiane Bruce <db@FreeBSD.org>2013-12-28 22:18:48 +0000
commitf4f040963dd13d8d3ff8480b8c68140affa48e6a (patch)
treeb83459bd94a65382ae5a3e8c8db337a5e5166aa6 /comms/unixcw
parentfa1c274fbfadd59084a527ad61265ddeb8ed47e2 (diff)
downloadports-f4f040963dd13d8d3ff8480b8c68140affa48e6a.tar.gz
ports-f4f040963dd13d8d3ff8480b8c68140affa48e6a.zip
Notes
Diffstat (limited to 'comms/unixcw')
-rw-r--r--comms/unixcw/Makefile37
-rw-r--r--comms/unixcw/distinfo4
-rw-r--r--comms/unixcw/files/patch-Makefile.inc.in10
-rw-r--r--comms/unixcw/files/patch-configure.ac58
-rw-r--r--comms/unixcw/files/patch-configure.qt.inc80
-rw-r--r--comms/unixcw/files/patch-src_cw_Makefile19
-rw-r--r--comms/unixcw/files/patch-src_cwcp_Makefile11
-rw-r--r--comms/unixcw/files/patch-src_cwgen_Makefile21
-rw-r--r--comms/unixcw/files/patch-src_cwlib_Makefile27
-rw-r--r--comms/unixcw/files/patch-src_cwlib_cwlib.c25
-rw-r--r--comms/unixcw/files/patch-src_cwutils_Makefile11
-rw-r--r--comms/unixcw/files/patch-src_cwutils_dictionary.h19
-rw-r--r--comms/unixcw/files/patch-src_libcw_Makefile.am36
-rw-r--r--comms/unixcw/files/patch-src_libcw_Makefile.in36
-rw-r--r--comms/unixcw/files/patch-src_libcw_libcw.c44
-rw-r--r--comms/unixcw/files/patch-src_libcw_libcw_console.c19
-rw-r--r--comms/unixcw/files/patch-src_libcw_libcw_oss.c19
-rw-r--r--comms/unixcw/files/patch-src_xcwcp_Makefile11
-rw-r--r--comms/unixcw/files/patch-src_xcwcp_Makefile.am14
-rw-r--r--comms/unixcw/files/patch-src_xcwcp_Makefile.in14
-rw-r--r--comms/unixcw/pkg-plist16
21 files changed, 319 insertions, 212 deletions
diff --git a/comms/unixcw/Makefile b/comms/unixcw/Makefile
index 37d6922c01b7..376436b32887 100644
--- a/comms/unixcw/Makefile
+++ b/comms/unixcw/Makefile
@@ -1,40 +1,35 @@
-# Created by: Diane Bruce <db@db.net>
# $FreeBSD$
PORTNAME= unixcw
-PORTVERSION= 2.3
-PORTREVISION= 1
+PORTVERSION= 3.2.0
CATEGORIES= comms hamradio
-MASTER_SITES= http://www.ibiblio.org/pub/linux/apps/ham/morse/ \
- ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= db
-EXTRACT_SUFX= .tgz
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+DISTNAME= unixcw_3.2.0.orig
MAINTAINER= db@FreeBSD.org
COMMENT= Libs for cw on unix
+LICENSE= GPLv2
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --includedir="${LOCALBASE}/include" \
- --libdir="${LOCALBASE}/lib"
-MAN1= cw.1 cwgen.1 cwcp.1
-MAN3= cwlib.3
+ --libdir="${LOCALBASE}/lib" \
+ --disable-alsa --disable-pulseaudio
+
.if defined(WITH_XCWCP)
-BROKEN= Depends on QT3 which is removed, update is in progress
-MAN1+= xcwcp.1
-USE_QT_VER= 3
-CONFIGURE_ARGS+= QTLIB=qt-mt
+USE_QT4= gui moc_build qmake_build rcc_build uic_build designer
+USE_AUTOTOOLS= autoconf
PLIST_SUB+= XCWCP=""
+CONFIGURE_ARGS+= --enable-xcwcp
.else
PLIST_SUB+= XCWCP="@comment "
+CONFIGURE_ARGS+= --disable-xcwcp
.endif
-MAN7= cw.7 CW.7
-MANCOMPRESSED= yes
-USE_AUTOTOOLS= autoconf
USE_LDCONFIG= yes
USE_GMAKE= yes
-AUTOTOOLSFILES= configure.ac
+USE_CSTD= gnu99
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-NO_STAGE= yes
pre-extract:
.if !defined(WITH_XCWCP)
@${ECHO_CMD}
@@ -44,8 +39,4 @@ pre-extract:
@sleep 3
.endif
-post-patch:
- @${REINPLACE_CMD} -e "s|%%LIBDATA%%|${PREFIX}/libdata|" \
- ${WRKSRC}/src/cwlib/Makefile
-
.include <bsd.port.mk>
diff --git a/comms/unixcw/distinfo b/comms/unixcw/distinfo
index 0840192dba6c..1b800e62ea95 100644
--- a/comms/unixcw/distinfo
+++ b/comms/unixcw/distinfo
@@ -1,2 +1,2 @@
-SHA256 (unixcw-2.3.tgz) = 124c60c6c7ef596a7c96c94a0e76204c7d986373564121155f0f206ad71f30a0
-SIZE (unixcw-2.3.tgz) = 202048
+SHA256 (unixcw_3.2.0.orig.tar.gz) = 638eb9cf2255dfee7e0b548716abbcdfe685b973a4180f28718284a972f5eba8
+SIZE (unixcw_3.2.0.orig.tar.gz) = 604561
diff --git a/comms/unixcw/files/patch-Makefile.inc.in b/comms/unixcw/files/patch-Makefile.inc.in
deleted file mode 100644
index e10cbda2da39..000000000000
--- a/comms/unixcw/files/patch-Makefile.inc.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.inc.in.orig 2007-12-28 15:21:30.000000000 -0500
-+++ Makefile.inc.in 2007-12-28 15:21:22.000000000 -0500
-@@ -30,6 +30,7 @@
- AC_AWK = @AWK@
- AC_RANLIB = @RANLIB@
- AC_QTDIR = @QTDIR@
-+AC_QTLIB = @QTLIBR@
- AC_QTMOC = @QTMOC@
- AC_CFLAG_PIC = @CFLAG_PIC@
- AC_SUBDIRS = @SUBDIRS@
diff --git a/comms/unixcw/files/patch-configure.ac b/comms/unixcw/files/patch-configure.ac
index a362169195e6..112cfd44c63b 100644
--- a/comms/unixcw/files/patch-configure.ac
+++ b/comms/unixcw/files/patch-configure.ac
@@ -1,47 +1,11 @@
---- configure.ac.orig 2006-07-13 01:31:21.000000000 -0400
-+++ configure.ac 2007-12-28 15:31:58.000000000 -0500
-@@ -18,11 +18,10 @@
- #
-
- # General initializations.
--AC_PREREQ(2.57)
-+AC_PREREQ(%%AUTOCONF_VERSION%%)
- AC_INIT([UnixCW], 2.3, [simon_baldwin@yahoo.com])
--
- # Specify a configuration header.
--AC_CONFIG_HEADERS(src/config.h)
-+AC_CONFIG_HEADER(src/config.h)
-
- # General checks for programs.
- AC_PROG_CC
-@@ -48,6 +47,7 @@
-
- # Checks for libraries.
- AC_CHECK_LIB(curses, initscr)
-+AC_CHECK_LIB(intl, gettext)
-
- # Checks for header files, and refuse to go on if no KIOCSOUND is available.
- AC_HEADER_STDC
-@@ -136,7 +136,12 @@
- AC_MSG_WARN([Hint: try setting a value for the QTDIR variable])
- fi
- AC_SUBST(SUBDIRS)
--
-+if test -n "$QTLIB" ; then
-+ QTLIBR=$QTLIB
-+else
-+ QTLIBR="qt"
-+fi
-+AC_SUBST(QTLIBR)
- # Add -Wall, -W, -pedantic, and other paranoia to gcc command flags, and -Wall
- # to with a few suppressions to icc command flags, then similarly, though less
- # so, for g++ and icpc.
-@@ -200,6 +205,8 @@
- fi
- fi
- rm -f conftest.so
-+dnl fake it here for now
-+ CC_LINKS_SO="yes"
- if test $CC_LINKS_SO = "yes" ; then
- AC_MSG_RESULT(yes)
- else
+--- configure.ac.orig 2013-07-16 21:37:30.000000000 -0500
++++ configure.ac 2013-07-16 21:37:49.000000000 -0500
+@@ -292,7 +292,7 @@
+ # autodetection of Qt4 dependencies
+ m4_include([configure.qt.inc])
+
+- if [[[ $QT4INC != "" && $QT4MOC != "" ]]] ; then
++ if [[ "$QT4INC" -a "$QT4MOC" ]] ; then
+ # we have moc4 and path to Qt4 include files,
+ # so we can build xcwcp
+ WITH_XCWCP='yes'
diff --git a/comms/unixcw/files/patch-configure.qt.inc b/comms/unixcw/files/patch-configure.qt.inc
new file mode 100644
index 000000000000..6be5b4986266
--- /dev/null
+++ b/comms/unixcw/files/patch-configure.qt.inc
@@ -0,0 +1,80 @@
+--- configure.qt.inc.orig 2013-01-06 09:53:52.000000000 -0500
++++ configure.qt.inc 2013-07-16 21:39:12.000000000 -0500
+@@ -51,10 +51,19 @@
+ QT4MOC="" # full path to Qt4 moc
+ # QT4DIR="" # for testing purposes
+
+-
++AC_ARG_WITH([qt-includes],
++AC_HELP_STRING([--with-qt-includes=<path>],
++ [path to qt4 include files]),
++ [QT4INC=$with_qt_includes])
++
++AC_ARG_WITH([qt-libraries],
++AC_HELP_STRING([--with-qt-libraries=<path>],
++ [path to qt4 libraries]),
++ [QT4LIBS=$with_qt_libraries])
+
+
+ # Task 1: find Qt4 include directory, and for QT4 library
++
+ PKG_CHECK_MODULES([QT4], [ "QtCore QtGui"],
+ [ AC_SUBST(QT4INC, $QT4_CFLAGS) AC_SUBST(QT4LIBS) ],
+ [ AC_MSG_ERROR([Qt4 libs not found])
+@@ -66,8 +75,12 @@
+ # Task 2: find Qt4 moc
+ QT4MOC=""
+ QT4MOC_PATH=""
+-
+-if [[[ $QT4DIR = "" ]]] ; then
++QT4MOC_PATH=${MOC}
++if [[ $MOC ]] ; then
++ QT4MOC_PATH=${MOC}
++ ac_cv_path_QT4MOC_PATH=$MOC
++ echo ac_cv_path_QT4MOC_PATH $ac_cv_path_QT4MOC_PATH
++elif [[ -z $QT4DIR ]] ; then
+
+ # we should guess where Qt4 moc binary is;
+ # first we see if we are lucky and Qt4 moc installed on build machine
+@@ -93,17 +106,15 @@
+
+
+
+-
+-
+ # Task 3: make sure that major version of the moc is >= MOC_MAJOR_EARLIEST
+-if [[[ "$QT4MOC_PATH" != "" ]]] ; then
++if [[ "$QT4MOC_PATH" ]] ; then
+ MOC_VERSION="`$QT4MOC_PATH -v 2>&1 | sed -e 's;.*(Qt ;;' -e 's;).*;;'`"
+- if [[[ "$MOC_VERSION" != "" ]]] ; then
++ if [[ "$MOC_VERSION" ]] ; then
+ MOC_MAJOR="`echo $MOC_VERSION | sed -e 's;\..*;;'`"
+ expr "$MOC_MAJOR" + 0 >/dev/null 2>/dev/null
+ status=$?
+- if [[[ "$MOC_MAJOR" != "" && $status = 0 ]]] ; then
+- if [[[ "$MOC_MAJOR" < "$MOC_MAJOR_EARLIEST" ]]] ; then
++ if [[ "$MOC_MAJOR" -a $status = "0" ]] ; then
++ if [[ "$MOC_MAJOR" -lt "$MOC_MAJOR_EARLIEST" ]] ; then
+ AC_MSG_WARN("Found moc $MOC_VERSION - unable to build xcwcp")
+ AC_MSG_WARN(["xcwcp requires moc version >= $MOC_MAJOR_EARLIEST"])
+ else
+@@ -126,16 +137,16 @@
+
+
+ # Task 4: on success set up some build system variables (AC_SUBST)
+-if [[[ $QT4INC != "" && $QT4MOC != "" ]]] ; then
++if [[ "$QT4INC" -a "$QT4MOC" ]] ; then
+ echo "Qt4 headers dir is $QT4INC"
+ echo "Qt4 moc is $QT4MOC"
+
+ else
+- if [[[ $QT4INC = "" ]]] ; then
++ if [[ "$QT4INC" ]] ; then
+ AC_MSG_WARN(["Can't find directory with Qt4 header files - unable to build xcwcp"])
+ fi
+
+- if [[[ $QT4MOC = "" ]]] ; then
++ if [[ "$QT4MOC" ]] ; then
+ AC_MSG_WARN(["Can't find Qt moc version >= $MOC_MAJOR_EARLIEST - unable to build xcwcp"])
+ AC_MSG_WARN(["Hint: to build xcwcp make sure that moc is in QT4DIR/bin on your PATH"])
+ fi
diff --git a/comms/unixcw/files/patch-src_cw_Makefile b/comms/unixcw/files/patch-src_cw_Makefile
deleted file mode 100644
index 88d3eb17f64d..000000000000
--- a/comms/unixcw/files/patch-src_cw_Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/cw/Makefile.orig 2007-12-25 22:55:33.000000000 -0500
-+++ src/cw/Makefile 2007-12-25 22:56:25.000000000 -0500
-@@ -19,14 +19,14 @@
-
- include ../../Makefile.inc
- CC = $(AC_CC)
--CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib -I../cwutils
-+CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib -I../cwutils -I$(includedir)
- GZIP = $(AC_GZIP)
-
- SHELL = /bin/sh
-
- default: all
-
--LIBS = -L../cwlib -lcw
-+LIBS = -L../cwlib -lcw $(AC_LIBS)
-
- # Build the cw binary.
- all: cw
diff --git a/comms/unixcw/files/patch-src_cwcp_Makefile b/comms/unixcw/files/patch-src_cwcp_Makefile
deleted file mode 100644
index 582596227315..000000000000
--- a/comms/unixcw/files/patch-src_cwcp_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/cwcp/Makefile.orig 2007-12-25 22:49:04.000000000 -0500
-+++ src/cwcp/Makefile 2007-12-25 22:52:06.000000000 -0500
-@@ -19,7 +19,7 @@
-
- include ../../Makefile.inc
- CC = $(AC_CC)
--CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib -I../cwutils
-+CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib -I../cwutils -I${includedir}
- GZIP = $(AC_GZIP)
- LIBS = -L../cwlib -lcw $(AC_LIBS)
-
diff --git a/comms/unixcw/files/patch-src_cwgen_Makefile b/comms/unixcw/files/patch-src_cwgen_Makefile
deleted file mode 100644
index fd27bfdebace..000000000000
--- a/comms/unixcw/files/patch-src_cwgen_Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/cwgen/Makefile.orig 2006-07-14 22:54:09.000000000 -0400
-+++ src/cwgen/Makefile 2007-12-25 17:22:39.000000000 -0500
-@@ -19,7 +19,8 @@
-
- include ../../Makefile.inc
- CC = $(AC_CC)
--CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwutils
-+CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwutils -I${includedir}
-+LDFLAGS= $(AC_LIBS)
- GZIP = $(AC_GZIP)
-
- SHELL = /bin/sh
-@@ -33,7 +34,7 @@
-
- cwgen: cwgen.o
- $(CC) -o $@ cwgen.o ../cwutils/i18n.o ../cwutils/cmdline.o \
-- ../cwutils/memory.o
-+ ../cwutils/memory.o $(LDFLAGS)
-
- # Install targets.
- install: all
diff --git a/comms/unixcw/files/patch-src_cwlib_Makefile b/comms/unixcw/files/patch-src_cwlib_Makefile
deleted file mode 100644
index 397a74375af7..000000000000
--- a/comms/unixcw/files/patch-src_cwlib_Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
---- src/cwlib/Makefile.orig 2006-07-14 23:31:40.000000000 -0400
-+++ src/cwlib/Makefile 2007-12-24 17:02:11.000000000 -0500
-@@ -83,14 +83,13 @@
- # Install targets.
- install: all
- $(INSTALL) -d $(includedir) $(libdir) $(mandir)/man3 $(mandir)/man7 \
-- $(libdir)/pkgconfig
-+ %%LIBDATA%%/pkgconfig
- $(INSTALL_DATA) cwlib.h $(includedir)/cwlib.h
- $(INSTALL_DATA) libcw.a $(libdir)/libcw.a
- if [ "$(CC_LINKS_SO)" = "yes" -o "$(LD_LINKS_SO)" = "yes" ]; then \
- $(INSTALL_PROGRAM) libcw.so.0.0.0 $(libdir)/libcw.so.0.0.0; \
- $(LN_S) -f libcw.so.0.0.0 $(libdir)/libcw.so.0; \
- $(LN_S) -f libcw.so.0.0.0 $(libdir)/libcw.so; \
-- $(LDCONFIG) -n $(libdir); \
- fi
- $(INSTALL_DATA) cwlib.3 $(mandir)/man3/cwlib.3
- $(GZIP) -f -9 $(mandir)/man3/cwlib.3
-@@ -98,7 +97,7 @@
- $(GZIP) -f -9 $(mandir)/man7/cw.7
- $(INSTALL_DATA) cw.7 $(mandir)/man7/CW.7
- $(GZIP) -f -9 $(mandir)/man7/CW.7
-- $(INSTALL_DATA) libcw.pc $(libdir)/pkgconfig/libcw.pc
-+ $(INSTALL_DATA) libcw.pc %%LIBDATA%%/pkgconfig/libcw.pc
-
- install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
diff --git a/comms/unixcw/files/patch-src_cwlib_cwlib.c b/comms/unixcw/files/patch-src_cwlib_cwlib.c
deleted file mode 100644
index 5515bc570400..000000000000
--- a/comms/unixcw/files/patch-src_cwlib_cwlib.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/cwlib/cwlib.c.orig 2006-06-22 21:54:01.000000000 -0400
-+++ src/cwlib/cwlib.c 2008-01-01 11:54:49.000000000 -0500
-@@ -63,6 +63,7 @@
-
- #if defined(BSD)
- # define ERR_NO_SUPPORT EPROTONOSUPPORT
-+# define RTSIG_MAX NSIG
- #else
- # define ERR_NO_SUPPORT EPROTO
- #endif
-@@ -2837,8 +2838,14 @@
- * crude, but perhaps just slightly better than doing nothing.
- */
- if (cw_volume > 0)
-+/* FreeBSD at least uses hz directly, I'll assume other BSDs do too. - db */
-+#ifdef BSD
-+ argument = frequency != TONE_SILENT
-+ ? frequency : 0;
-+#else
- argument = frequency != TONE_SILENT
- ? KIOCSOUND_CLOCK_TICK_RATE / frequency : 0;
-+#endif
- else
- argument = 0;
-
diff --git a/comms/unixcw/files/patch-src_cwutils_Makefile b/comms/unixcw/files/patch-src_cwutils_Makefile
deleted file mode 100644
index bbf2e5541e8d..000000000000
--- a/comms/unixcw/files/patch-src_cwutils_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/cwutils/Makefile.orig 2007-12-25 09:49:34.000000000 -0500
-+++ src/cwutils/Makefile 2007-12-25 09:59:12.000000000 -0500
-@@ -19,7 +19,7 @@
-
- include ../../Makefile.inc
- CC = $(AC_CC)
--CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib
-+CFLAGS = $(AC_CFLAGS) $(AC_DEFS) -I../cwlib -I${includedir}
-
- SHELL = /bin/sh
-
diff --git a/comms/unixcw/files/patch-src_cwutils_dictionary.h b/comms/unixcw/files/patch-src_cwutils_dictionary.h
new file mode 100644
index 000000000000..82afa7feb3c2
--- /dev/null
+++ b/comms/unixcw/files/patch-src_cwutils_dictionary.h
@@ -0,0 +1,19 @@
+--- src/cwutils/dictionary.h.orig 2013-01-03 17:12:43.000000000 -0500
++++ src/cwutils/dictionary.h 2013-07-15 18:50:15.000000000 -0500
+@@ -41,6 +41,7 @@
+
+ /* Everything below is deprecated. */
+ typedef struct cw_dictionary_s dictionary;
++#if 0
+
+ extern int dictionary_load(const char *file) __attribute__ ((deprecated("Use cw_dictionaries_read()")));
+ extern void dictionary_unload(void) __attribute__ ((deprecated("Use cw_dictionaries_unload()")));
+@@ -51,7 +52,7 @@
+ extern const char *get_dictionary_description(const dictionary *dict) __attribute__ ((deprecated("Use cw_dictionary_get_description()")));
+ extern int get_dictionary_group_size(const dictionary *dict) __attribute__ ((deprecated("Use cw_dictionary_get_group_size()")));
+ extern const char *get_dictionary_random_word(const dictionary *dict) __attribute__ ((deprecated("Use cw_dictionary_get_random_word()")));
+-
++#endif
+ #if defined(__cplusplus)
+ }
+ #endif
diff --git a/comms/unixcw/files/patch-src_libcw_Makefile.am b/comms/unixcw/files/patch-src_libcw_Makefile.am
new file mode 100644
index 000000000000..6d60c28dc726
--- /dev/null
+++ b/comms/unixcw/files/patch-src_libcw_Makefile.am
@@ -0,0 +1,36 @@
+--- src/libcw/Makefile.am.orig 2013-01-05 07:03:23.000000000 -0500
++++ src/libcw/Makefile.am 2013-07-17 10:05:14.000000000 -0500
+@@ -41,7 +41,7 @@
+
+ # target-specific linker flags (objects to link)
+ # libcw_la_LIBADD=-lm -lpthread $(AC_ALSA_LIBS) $(AC_PULSEAUDIO_LIBS)
+-libcw_la_LIBADD=-lm -lpthread -ldl
++libcw_la_LIBADD=-lm -lpthread
+
+ # target-specific linker flags (additional flags)
+ # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+@@ -78,7 +78,7 @@
+ libcwunittests_CPPFLAGS = $(AM_CPPFLAGS) -DLIBCW_UNIT_TESTS
+
+ # target-specific linker flags (objects to link)
+-libcwunittests_LDADD=-lm -lpthread -ldl
++libcwunittests_LDADD=-lm -lpthread
+
+ # target-specific compiler flags
+ libcwunittests_CFLAGS = -rdynamic
+@@ -94,12 +94,12 @@
+
+
+ standalone:
+- gcc -O0 -g -DHAVE_CONFIG_H -std=c99 -I. -I../../src -I../../src/ -I../../src/libcw/ -I../../src/cwutils/ -DLIBCW_WITH_DEV -DLIBCW_STANDALONE -DLIBCW_WITH_PULSEAUDIO -DLIBCW_WITH_OSS -DLIBCW_WITH_ALSA -DLIBCW_WITH_CONSOLE libcw.c libcw_console.c libcw_null.c libcw_pa.c libcw_debug.c libcw_oss.c libcw_alsa.c -lm -ldl -lpthread
++ $(CC) -O0 -g -DHAVE_CONFIG_H -std=c99 -I. -I../../src -I../../src/ -I../../src/libcw/ -I../../src/cwutils/ -DLIBCW_WITH_DEV -DLIBCW_STANDALONE -DLIBCW_WITH_PULSEAUDIO -DLIBCW_WITH_OSS -DLIBCW_WITH_ALSA -DLIBCW_WITH_CONSOLE libcw.c libcw_console.c libcw_null.c libcw_pa.c libcw_debug.c libcw_oss.c libcw_alsa.c -lm -lpthread
+
+
+ # target: libcw.pc
+-pkgconfigdir = $(libdir)/pkgconfig
+-
++#pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = ${prefix}/libdata/pkgconfig
+
+
+
diff --git a/comms/unixcw/files/patch-src_libcw_Makefile.in b/comms/unixcw/files/patch-src_libcw_Makefile.in
new file mode 100644
index 000000000000..8e2f2a30cf18
--- /dev/null
+++ b/comms/unixcw/files/patch-src_libcw_Makefile.in
@@ -0,0 +1,36 @@
+--- src/libcw/Makefile.in.orig 2013-01-11 13:29:34.000000000 -0500
++++ src/libcw/Makefile.in 2013-12-28 16:17:07.533315780 -0500
+@@ -324,7 +324,7 @@
+
+ # target-specific linker flags (objects to link)
+ # libcw_la_LIBADD=-lm -lpthread $(AC_ALSA_LIBS) $(AC_PULSEAUDIO_LIBS)
+-libcw_la_LIBADD = -lm -lpthread -ldl
++libcw_la_LIBADD = -lm -lpthread
+
+ # target-specific linker flags (additional flags)
+ # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+@@ -355,13 +355,13 @@
+ libcwunittests_CPPFLAGS = $(AM_CPPFLAGS) -DLIBCW_UNIT_TESTS
+
+ # target-specific linker flags (objects to link)
+-libcwunittests_LDADD = -lm -lpthread -ldl
++libcwunittests_LDADD = -lm -lpthread
+
+ # target-specific compiler flags
+ libcwunittests_CFLAGS = -rdynamic
+
+ # target: libcw.pc
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = ${prefix}/libdata/pkgconfig
+
+ # CLEANFILES extends list of files that need to be removed when
+ # calling "make clean"
+@@ -1114,7 +1114,7 @@
+ rm -f signatures functions
+
+ standalone:
+- gcc -O0 -g -DHAVE_CONFIG_H -std=c99 -I. -I../../src -I../../src/ -I../../src/libcw/ -I../../src/cwutils/ -DLIBCW_WITH_DEV -DLIBCW_STANDALONE -DLIBCW_WITH_PULSEAUDIO -DLIBCW_WITH_OSS -DLIBCW_WITH_ALSA -DLIBCW_WITH_CONSOLE libcw.c libcw_console.c libcw_null.c libcw_pa.c libcw_debug.c libcw_oss.c libcw_alsa.c -lm -ldl -lpthread
++ gcc -O0 -g -DHAVE_CONFIG_H -std=c99 -I. -I../../src -I../../src/ -I../../src/libcw/ -I../../src/cwutils/ -DLIBCW_WITH_DEV -DLIBCW_STANDALONE -DLIBCW_WITH_PULSEAUDIO -DLIBCW_WITH_OSS -DLIBCW_WITH_ALSA -DLIBCW_WITH_CONSOLE libcw.c libcw_console.c libcw_null.c libcw_pa.c libcw_debug.c libcw_oss.c libcw_alsa.c -lm -lpthread
+ greptest.sh:
+ echo './libcwunittests | grep "test result: success"' > greptest.sh
+ chmod +x greptest.sh
diff --git a/comms/unixcw/files/patch-src_libcw_libcw.c b/comms/unixcw/files/patch-src_libcw_libcw.c
new file mode 100644
index 000000000000..297729492af2
--- /dev/null
+++ b/comms/unixcw/files/patch-src_libcw_libcw.c
@@ -0,0 +1,44 @@
+--- src/libcw/libcw.c.orig 2013-07-15 14:27:57.000000000 -0500
++++ src/libcw/libcw.c 2013-07-15 17:28:22.000000000 -0500
+@@ -43,15 +43,9 @@
+ - Section:Global variables
+ */
+
+-
+ #include "config.h"
+
+
+-#define _BSD_SOURCE /* usleep() */
+-#define _POSIX_SOURCE /* sigaction() */
+-#define _POSIX_C_SOURCE 200112L /* pthread_sigmask() */
+-
+-
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+@@ -84,7 +78,6 @@
+ # include <strings.h>
+ #endif
+
+-
+ /* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403043 */
+ #if defined(NSIG) /* Debian GNU/Linux: signal.h; Debian kFreeBSD: signal.h (libc0.1-dev_2.13-21_kfreebsd-i386.deb) */
+ #define CW_SIG_MAX (NSIG)
+@@ -92,10 +85,17 @@
+ #define CW_SIG_MAX (_NSIG)
+ #elif defined(RTSIG_MAX) /* Debian GNU/Linux: linux/limits.h */
+ #define CW_SIG_MAX ((RTSIG_MAX)+1)
++#elif defined(__FreeBSD__)
++#define CW_SIG_MAX (_SIG_MAXSIG)
+ #else
+ #error "unknown number of signals"
+ #endif
+
++#ifndef __FreeBSD__
++#define _BSD_SOURCE /* usleep() */
++#define _POSIX_SOURCE /* sigaction() */
++#define _POSIX_C_SOURCE 200112L /* pthread_sigmask() */
++#endif
+
+
+ #if defined(BSD)
diff --git a/comms/unixcw/files/patch-src_libcw_libcw_console.c b/comms/unixcw/files/patch-src_libcw_libcw_console.c
new file mode 100644
index 000000000000..2354f4493a1f
--- /dev/null
+++ b/comms/unixcw/files/patch-src_libcw_libcw_console.c
@@ -0,0 +1,19 @@
+--- src/libcw/libcw_console.c.orig 2013-01-08 14:50:13.000000000 -0500
++++ src/libcw/libcw_console.c 2013-07-15 18:53:39.000000000 -0500
+@@ -39,6 +39,16 @@
+ # include <sys/kbio.h>
+ #endif
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++# include <sys/param.h>
++#endif
++
++#ifdef __FreeBSD__
++#include <fcntl.h>
++#include <errno.h>
++#include <assert.h>
++#endif
++
+
+ #include "libcw_console.h"
+ #include "libcw_debug.h"
diff --git a/comms/unixcw/files/patch-src_libcw_libcw_oss.c b/comms/unixcw/files/patch-src_libcw_libcw_oss.c
new file mode 100644
index 000000000000..84d887240ee8
--- /dev/null
+++ b/comms/unixcw/files/patch-src_libcw_libcw_oss.c
@@ -0,0 +1,19 @@
+--- src/libcw/libcw_oss.c.orig 2013-12-26 11:47:03.000000000 -0500
++++ src/libcw/libcw_oss.c 2013-12-27 18:56:52.000000000 -0500
+@@ -291,14 +291,14 @@
+ "cw_oss: ioctl(SNDCTL_DSP_SYNC): \"%s\"", strerror(errno));
+ return CW_FAILURE;
+ }
+-
++#if 0
+ parameter = 0; /* ignored */
+ if (ioctl(*fd, SNDCTL_DSP_POST, &parameter) == -1) {
+ cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
+ "cw_oss: ioctl(SNDCTL_DSP_POST): \"%s\"", strerror(errno));
+ return CW_FAILURE;
+ }
+-
++#endif
+ /* Set the audio format to 8-bit unsigned. */
+ parameter = CW_OSS_SAMPLE_FORMAT;
+ if (ioctl(*fd, SNDCTL_DSP_SETFMT, &parameter) == -1) {
diff --git a/comms/unixcw/files/patch-src_xcwcp_Makefile b/comms/unixcw/files/patch-src_xcwcp_Makefile
deleted file mode 100644
index c81b60b2a8f1..000000000000
--- a/comms/unixcw/files/patch-src_xcwcp_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/xcwcp/Makefile.orig 2006-07-14 22:54:23.000000000 -0400
-+++ src/xcwcp/Makefile 2007-12-28 15:19:25.000000000 -0500
-@@ -31,7 +31,7 @@
- moc_application.o
-
- # Link to the shared libcw.
--LIBS = -L$(QTDIR)/lib -lqt -L../cwlib -lcw
-+LIBS = -L$(QTDIR)/lib -L../cwlib -lcw -l${AC_QTLIB} ${AC_LIBS}
-
- default: all
-
diff --git a/comms/unixcw/files/patch-src_xcwcp_Makefile.am b/comms/unixcw/files/patch-src_xcwcp_Makefile.am
new file mode 100644
index 000000000000..5b206803b553
--- /dev/null
+++ b/comms/unixcw/files/patch-src_xcwcp_Makefile.am
@@ -0,0 +1,14 @@
+--- src/xcwcp/Makefile.am.orig 2013-01-06 09:36:57.000000000 -0500
++++ src/xcwcp/Makefile.am 2013-12-28 12:59:43.473131692 -0500
+@@ -35,9 +35,9 @@
+ sender.cc sender.h
+
+ # target-specific preprocessor flags (#defs and include dirs)
+-xcwcp_CPPFLAGS = $(AM_CPPFLAGS) -I$(AC_QT4INC) #-I$(AC_QT4INC)/QtCore -I$(AC_QT4INC)/QtGui
++xcwcp_CPPFLAGS = $(AM_CPPFLAGS) $(AC_QT4INC)
+ # target-specific linker flags (objects to link)
+-xcwcp_LDADD = -L$(top_builddir)/src/libcw/.libs -lcw -lQtGui -lQtCore $(top_builddir)/src/cwutils/lib_xcwcp.a
++xcwcp_LDADD = -L$(top_builddir)/src/libcw/.libs -lcw -L$(QT4LIBS) -lQtGui -lQtCore $(top_builddir)/src/cwutils/lib_xcwcp.a
+
+
+
diff --git a/comms/unixcw/files/patch-src_xcwcp_Makefile.in b/comms/unixcw/files/patch-src_xcwcp_Makefile.in
new file mode 100644
index 000000000000..4d2093889e8b
--- /dev/null
+++ b/comms/unixcw/files/patch-src_xcwcp_Makefile.in
@@ -0,0 +1,14 @@
+--- src/xcwcp/Makefile.in.orig 2013-12-28 13:25:22.498024595 -0500
++++ src/xcwcp/Makefile.in 2013-12-28 13:54:24.916904378 -0500
+@@ -297,9 +297,9 @@
+
+
+ # target-specific preprocessor flags (#defs and include dirs)
+-xcwcp_CPPFLAGS = $(AM_CPPFLAGS) -I$(AC_QT4INC) #-I$(AC_QT4INC)/QtCore -I$(AC_QT4INC)/QtGui
++xcwcp_CPPFLAGS = $(AM_CPPFLAGS) $(AC_QT4INC) #-I$(AC_QT4INC)/QtCore -I$(AC_QT4INC)/QtGui
+ # target-specific linker flags (objects to link)
+-xcwcp_LDADD = -L$(top_builddir)/src/libcw/.libs -lcw -lQtGui -lQtCore $(top_builddir)/src/cwutils/lib_xcwcp.a
++xcwcp_LDADD = -L$(top_builddir)/src/libcw/.libs -L$(QT4LIBS) -lcw -lQtGui -lQtCore $(top_builddir)/src/cwutils/lib_xcwcp.a
+
+ # copy man page to proper directory during installation
+ man_MANS = xcwcp.1
diff --git a/comms/unixcw/pkg-plist b/comms/unixcw/pkg-plist
index fc103be452d4..eb0a821a119b 100644
--- a/comms/unixcw/pkg-plist
+++ b/comms/unixcw/pkg-plist
@@ -1,11 +1,17 @@
bin/cw
bin/cwcp
-%%XCWCP%%bin/xcwcp
bin/cwgen
-include/cw.h
-include/cwlib.h
+%%XCWCP%%bin/xcwcp
+include/libcw.h
+include/libcw_debug.h
lib/libcw.a
lib/libcw.so
-lib/libcw.so.0
-lib/libcw.so.0.0.0
+lib/libcw.so.5
+lib/libcw.la
libdata/pkgconfig/libcw.pc
+man/man1/cw.1.gz
+man/man1/cwgen.1.gz
+man/man1/cwcp.1.gz
+%%XCWCP%%/man/man1/xcwcp.1.gz
+man/man3/libcw.3.gz
+man/man7/cw.7.gz