summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-06 07:03:25 +0000
committerSam James <sam@gentoo.org>2022-11-06 07:05:17 +0000
commit27a8253e1709891f385278b26ba4b6a41059d7ef (patch)
tree6da52242a3734040ae3d021b89fb0ca89280f166
parentprofiles/base: Stable-unmask py3.11 on dev-lang/python-exec (diff)
downloadgentoo-27a8253e1709891f385278b26ba4b6a41059d7ef.tar.gz
gentoo-27a8253e1709891f385278b26ba4b6a41059d7ef.tar.bz2
gentoo-27a8253e1709891f385278b26ba4b6a41059d7ef.zip
media-sound/gsm: add 1.0.22_p1
Closes: https://bugs.gentoo.org/554358 Closes: https://bugs.gentoo.org/879849 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-sound/gsm/Manifest2
-rw-r--r--media-sound/gsm/files/gsm-1.0.22-makefile.patch188
-rw-r--r--media-sound/gsm/gsm-1.0.22_p1.ebuild63
3 files changed, 253 insertions, 0 deletions
diff --git a/media-sound/gsm/Manifest b/media-sound/gsm/Manifest
index 377c6dd24e40..f0e396447e37 100644
--- a/media-sound/gsm/Manifest
+++ b/media-sound/gsm/Manifest
@@ -1 +1,3 @@
DIST gsm-1.0.13.tar.gz 65318 BLAKE2B 22bb79e3afd9a2e99041693288342b55969207223486200d4aebc61908930040b6b766a9bf673ec6b484eeb95833684c79f34c95d32da17cfb4c36d025004858 SHA512 0d0cf9e1e81e64cd84f588c1e4f0cb74b849d45e41fdebf860f63588084c73c7c5198bfe73a6c976bda5735ee516661d3db00afbb5cc5886a7ee3a7b31d673aa
+DIST gsm-1.0.22.tar.gz 66583 BLAKE2B 4c654997e2dd91bc5cee406bd664426f86479bfa8624abb0d7ec164eaebe83c3f534b5ee16952b302500630a6f53df26bbb2287f7a329c8878ae48e61fb770ab SHA512 f4284f096ed4d606ddece5c1b28edb63feacc26a0b664f1350c040dbf50113d27bedfd9896bf1620cb4fc3a6c8f6a5244955a6c625ded833dcee607c63c97dd2
+DIST libgsm_1.0.22-1.debian.tar.xz 10516 BLAKE2B 8839082ec446c3eb9dde5d1348806ac5015557257b0c1d319945c36080277b40b25f4903013c5242115467a73e425731661ad4882cf35bba51a90e4f44f284ae SHA512 21929f790d7c821e03113baf3e0690e8cb4b8b3c9015ca6fa05593dba9c4fb000ad41546826bc623c69b19689e81092afe0f7e266b22f9db35e8c735516c9de4
diff --git a/media-sound/gsm/files/gsm-1.0.22-makefile.patch b/media-sound/gsm/files/gsm-1.0.22-makefile.patch
new file mode 100644
index 000000000000..9ef9e5a246c6
--- /dev/null
+++ b/media-sound/gsm/files/gsm-1.0.22-makefile.patch
@@ -0,0 +1,188 @@
+https://src.fedoraproject.org/rpms/gsm/blob/rawhide/f/gsm-makefile.patch
+
+--- a/Makefile
++++ b/Makefile
+@@ -44,13 +44,17 @@ WAV49 = -DWAV49
+ # CCFLAGS = -c -O
+
+ CC = gcc -ansi -pedantic
+-CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 -Wall -Wno-comment
++CCFLAGS = -c -DNeedFunctionPrototypes=1 -Wall -Wno-comment -D_XOPEN_SOURCE=700 -D_REENTRANT -fPIC
+
+ LD = $(CC)
+
+ # LD = gcc
+ # LDFLAGS =
+
++SO_MAJOR = 1
++SO_MINOR = 0
++SO_PATCH = 19
++SO_VER = $(SO_MAJOR).$(SO_MINOR).$(SO_PATCH)
+
+ # If your compiler needs additional flags/libraries, regardless of
+ # the source compiled, configure them here.
+@@ -81,7 +85,7 @@ INSTALL_ROOT =
+ GSM_INSTALL_ROOT = $(INSTALL_ROOT)
+ GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
+ GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
+-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
++GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
+
+
+ # Where do you want to install the toast binaries and their manpage?
+@@ -91,12 +95,12 @@ GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
+
+ TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
+ TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
+-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
++TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
+
+ # Other tools
+
+ SHELL = /bin/sh
+-LN = ln
++LN = ln -s
+ BASENAME = basename
+ AR = ar
+ ARFLAGS = cr
+@@ -140,6 +144,7 @@ LFLAGS = $(LDFLAGS) $(LDINC)
+ # Targets
+
+ LIBGSM = $(LIB)/libgsm.a
++LIBGSMSO = $(LIB)/libgsm.so
+
+ TOAST = $(BIN)/toast
+ UNTOAST = $(BIN)/untoast
+@@ -257,7 +262,9 @@ STUFF = ChangeLog \
+ # Install targets
+
+ GSM_INSTALL_TARGETS = \
+- $(GSM_INSTALL_LIB)/libgsm.a \
++ $(GSM_INSTALL_LIB)/libgsm.so.$(SO_VER) \
++ $(GSM_INSTALL_LIB)/libgsm.so.$(SO_MAJOR)\
++ $(GSM_INSTALL_LIB)/libgsm.so \
+ $(GSM_INSTALL_INC)/gsm.h \
+ $(GSM_INSTALL_MAN)/gsm.3 \
+ $(GSM_INSTALL_MAN)/gsm_explode.3 \
+@@ -279,7 +286,7 @@ TOAST_INSTALL_TARGETS = \
+
+ # Target rules
+
+-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
++all: $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
+ @-echo $(ROOT): Done.
+
+ tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
+@@ -299,24 +306,32 @@ install: toastinstall gsminstall
+
+ # The basic API: libgsm
+
++$(LIBGSMSO).$(SO_VER): $(LIB) $(GSM_OBJECTS)
++ $(LD) $(LFLAGS) -o $@ -shared -Xlinker -soname -Xlinker libgsm.so.$(SO_MAJOR) $(GSM_OBJECTS) -lc
++
++$(LIBGSMSO).$(SO_MAJOR): $(LIBGSMSO).$(SO_VER)
++ ln -fs libgsm.so.$(SO_VER) lib/libgsm.so.$(SO_MAJOR)
++
++$(LIBGSMSO): $(LIBGSMSO).$(SO_VER)
++ ln -fs libgsm.so.$(SO_VER) lib/libgsm.so
++
+ $(LIBGSM): $(LIB) $(GSM_OBJECTS)
+ -rm $(RMFLAGS) $(LIBGSM)
+ $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
+ $(RANLIB) $(LIBGSM)
+
+-
+ # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
+
+-$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
+- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
++$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSMSO)
++ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
+
+ $(UNTOAST): $(BIN) $(TOAST)
+ -rm $(RMFLAGS) $(UNTOAST)
+- $(LN) $(TOAST) $(UNTOAST)
++ $(LN) toast $(UNTOAST)
+
+ $(TCAT): $(BIN) $(TOAST)
+ -rm $(RMFLAGS) $(TCAT)
+- $(LN) $(TOAST) $(TCAT)
++ $(LN) toast $(TCAT)
+
+
+ # The local bin and lib directories
+@@ -352,52 +367,55 @@ toastuninstall:
+
+ $(TOAST_INSTALL_BIN)/toast: $(TOAST)
+ -rm $(RMFLAGS) $@
+- cp $(TOAST) $@
+- chmod 755 $@
++ install -pm755 $(TOAST) $@
+
+ $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
+ -rm $(RMFLAGS) $@
+- $(LN) $? $@
++ $(LN) -rs $? $@
+
+ $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
+ -rm $(RMFLAGS) $@
+- $(LN) $? $@
++ $(LN) -rs $? $@
+
+ $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
+ $(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
+ -rm $(RMFLAGS) $@
+- cp $? $@
+- chmod 444 $@
++ install -pm644 $? $@
+
++$(GSM_INSTALL_LIB)/libgsm.so.$(SO_VER): $(LIBGSMSO).$(SO_VER)
++ -rm $(RMFLAGS) $@
++ install -pm755 $? $@
++
++$(GSM_INSTALL_LIB)/libgsm.so.$(SO_MAJOR): $(LIBGSMSO).$(SO_MAJOR)
++ -rm $(RMFLAGS) $@
++ ln -s libgsm.so.$(SO_VER) $@
++
++$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO)
++ -rm $(RMFLAGS) $@
++ ln -s libgsm.so.$(SO_VER) $@
+
+ # Distribution
+
+
diff --git a/media-sound/gsm/gsm-1.0.22_p1.ebuild b/media-sound/gsm/gsm-1.0.22_p1.ebuild
new file mode 100644
index 000000000000..44152f94e8de
--- /dev/null
+++ b/media-sound/gsm/gsm-1.0.22_p1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Lossy speech compression library and tool"
+HOMEPAGE="https://packages.qa.debian.org/libg/libgsm.html"
+SRC_URI="
+ https://www.quut.com/gsm/${PN}-$(ver_cut 1-3).tar.gz
+ mirror://debian/pool/main/libg/lib${PN}/lib${PN}_${PV/_p/-}.debian.tar.xz
+"
+S="${WORKDIR}/${PN}-$(ver_cut 1-2)-pl$(ver_cut 3)"
+
+LICENSE="gsm"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.12-memcpy.patch
+ "${FILESDIR}"/${PN}-1.0.12-64bit.patch
+ "${WORKDIR}"/debian/patches
+ "${FILESDIR}"/${PN}-1.0.22-makefile.patch
+)
+
+DOCS=( ChangeLog MACHINES MANIFEST README )
+
+src_prepare() {
+ # Use Fedora's instead as it handles install perms (bug #554358)
+ rm "${WORKDIR}"/debian/patches/01_makefile.patch || die
+
+ default
+
+ sed -e 's/\$(GSM_INSTALL_LIB)\/libgsm.a //g' -i Makefile || die
+
+ multilib_copy_sources
+}
+
+src_configure() {
+ # From upstream Makefile. Define this if your host multiplies
+ # floats faster than integers, e.g. on a SPARCstation.
+ use sparc && append-flags -DUSE_FLOAT_MUL -DFAST
+}
+
+multilib_src_compile() {
+ emake -j1 CCFLAGS="${CFLAGS} -c -DNeedFunctionPrototypes=1 -fPIC" \
+ LD="$(tc-getCC)" AR="$(tc-getAR)" CC="$(tc-getCC)" RANLIB="$(tc-getRANLIB)"
+}
+
+multilib_src_install() {
+ dodir /usr/bin /usr/$(get_libdir) /usr/include/gsm /usr/share/man/man{1,3}
+
+ emake -j1 INSTALL_ROOT="${ED}"/usr \
+ LD="$(tc-getCC)" AR="$(tc-getAR)" CC="$(tc-getCC)" RANLIB="$(tc-getRANLIB)" \
+ GSM_INSTALL_LIB="${ED}"/usr/$(get_libdir) \
+ GSM_INSTALL_INC="${ED}"/usr/include/gsm \
+ GSM_INSTALL_MAN="${ED}"/usr/share/man/man3 \
+ TOAST_INSTALL_MAN="${ED}"/usr/share/man/man1 \
+ install
+
+ dosym ../gsm/gsm.h /usr/include/libgsm/gsm.h
+}