public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/gsm/, media-sound/gsm/files/
Date: Sun,  6 Nov 2022 07:06:24 +0000 (UTC)	[thread overview]
Message-ID: <1667718317.27a8253e1709891f385278b26ba4b6a41059d7ef.sam@gentoo> (raw)

commit:     27a8253e1709891f385278b26ba4b6a41059d7ef
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 07:03:25 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 07:05:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27a8253e

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 <AT> gentoo.org>

 media-sound/gsm/Manifest                        |   2 +
 media-sound/gsm/files/gsm-1.0.22-makefile.patch | 188 ++++++++++++++++++++++++
 media-sound/gsm/gsm-1.0.22_p1.ebuild            |  63 ++++++++
 3 files changed, 253 insertions(+)

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
+}


             reply	other threads:[~2022-11-06  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06  7:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-21 13:21 [gentoo-commits] repo/gentoo:master commit in: media-sound/gsm/, media-sound/gsm/files/ David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1667718317.27a8253e1709891f385278b26ba4b6a41059d7ef.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox