summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/freetdm/APKBUILD49
-rw-r--r--main/freetdm/remove-werr.patch44
2 files changed, 93 insertions, 0 deletions
diff --git a/main/freetdm/APKBUILD b/main/freetdm/APKBUILD
new file mode 100644
index 00000000000..9e55b5a5005
--- /dev/null
+++ b/main/freetdm/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=freetdm
+# upstream does not tag a release
+# the pkgver is the commit date
+pkgver=0_git20210830
+_commitid=8918ee1c3637cad0f9d41a402d26d3aa076fc202
+pkgrel=0
+pkgdesc="FreeTDM Endpoint Module "
+url="https://github.com/freeswitch/freetdm"
+arch="all"
+license="BSD-3-Clause"
+makedepends="libtool automake autoconf
+freeswitch-dev gsm-dev libpri-dev libpcap-dev zlib-dev
+python3-dev"
+checkdepends="gzip"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/freeswitch/freetdm/archive/$_commitid.tar.gz
+remove-werr.patch"
+builddir="$srcdir"/$pkgname-$_commitid
+
+prepare() {
+ default_prepare
+ sh bootstrap
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-libpri \
+ --with-modinstdir=/usr/lib/freeswitch
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ mkdir -p "$pkgdir"/etc/freeswitch/autoload_configs
+ echo '<load module="mod_freetdm"/>' >> "$pkgdir"/etc/freeswitch/autoload_configs/modules.conf.xml
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="
+059dd7c78a2fa08d79f9e4b9301ac4a0c8ccad9c32359e7c25f4fe5bdff33f9d146be746968baeb03b2c8702c33dbb962fc192f7fd20c8f8d2b5dbb81f2ecb77 freetdm-0_git20210830.tar.gz
+9bbf829370a374c9e09b1bfc02be158695213f4e62d116ee25960f5d05a5a52a8b7956e1def6795686e054f9d03aa270e345930a3401025450a23fb381ac4450 remove-werr.patch
+"
diff --git a/main/freetdm/remove-werr.patch b/main/freetdm/remove-werr.patch
new file mode 100644
index 00000000000..1aee35c0a2c
--- /dev/null
+++ b/main/freetdm/remove-werr.patch
@@ -0,0 +1,44 @@
+diff --git a/configure.ac b/configure.ac
+index aefebab..8b5041d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64],
+
+ case "${ax_cv_c_compiler_vendor}" in
+ gnu)
+- COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
++ COMP_VENDOR_CFLAGS="-ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
+ ;;
+ sun)
+ COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"
+@@ -97,7 +97,7 @@ sun)
+ fi
+ ;;
+ *)
+- COMP_VENDOR_COMPAT_CFLAGS="-Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
++ COMP_VENDOR_COMPAT_CFLAGS="-Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+ COMP_VENDOR_CFLAGS="-std=c99 $COMP_VENDOR_COMPAT_CFLAGS"
+ ;;
+ esac
+diff --git a/mod_freetdm/CMakeLists.txt b/mod_freetdm/CMakeLists.txt
+index 25847e7..7c7505a 100644
+--- a/mod_freetdm/CMakeLists.txt
++++ b/mod_freetdm/CMakeLists.txt
+@@ -5,7 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+ PROJECT(mod_freetdm)
+
+ IF(NOT DEFINED WIN32)
+- ADD_DEFINITIONS(-g -O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0 -g -ggdb -DPACKAGE_NAME=\"freetdm\" -DPACKAGE_TARNAME=\"freetdm\" -DPACKAGE_VERSION=\"pre-alpha\" -DPACKAGE_STRING=\"freetdm\ pre-alpha\" -DPACKAGE_BUGREPORT=\"bugs@freeswitch.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libfreetdm\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBM=1 -DSIZEOF_LONG=8 -DHAVE_NETINET_SCTP_H=1 -DHAVE_NETDB_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_GETHOSTBYNAME_R=1) # -DDEBUG=/\*\*/)
++ ADD_DEFINITIONS(-g -O2 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0 -g -ggdb -DPACKAGE_NAME=\"freetdm\" -DPACKAGE_TARNAME=\"freetdm\" -DPACKAGE_VERSION=\"pre-alpha\" -DPACKAGE_STRING=\"freetdm\ pre-alpha\" -DPACKAGE_BUGREPORT=\"bugs@freeswitch.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libfreetdm\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBM=1 -DSIZEOF_LONG=8 -DHAVE_NETINET_SCTP_H=1 -DHAVE_NETDB_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_GETHOSTBYNAME_R=1) # -DDEBUG=/\*\*/)
+ ENDIF(NOT DEFINED WIN32)
+
+ # includes
+@@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES(${mod_freetdm_INCLUDES})
+
+ LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/..)
+ ADD_LIBRARY(${PROJECT_NAME} SHARED mod_freetdm.c)
+-TARGET_LINK_LIBRARIES(${PROJECT_NAME} freetdm -fPIC -Werror -fvisibility=hidden)
++TARGET_LINK_LIBRARIES(${PROJECT_NAME} freetdm -fPIC -fvisibility=hidden)
+
+ IF(DEFINED WIN32)
+ SET(EXT lib)