Skip to content

Commit

Permalink
Fix spandsp builds for latest commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xrobau committed Oct 18, 2023
1 parent addb1ce commit 7924f4a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## If you change this version, make sure you run 'make clean'
VERSION=20230301
VERSION=20231017
RELEASE=1

## Set this to be the name of the Ubunt disto. It's used to tag
Expand All @@ -11,7 +11,7 @@ BUILDNAME=jammy
## debian version, after the major.minor.rel fields are added. You
## normally want to set this back to zero after you bump VERSION
## above.
FSREV=$(VERSION)~004
FSREV=$(VERSION)~001

ROOT:=$(shell pwd)
BUILDDIR:=$(ROOT)/build
Expand Down
4 changes: 2 additions & 2 deletions Makefile.settings
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Things to change
##
## https://github.com/freeswitch/spandsp
SPANDSPHASH=67d2455efe02e7ff0d897f3fd5636fed4d54549e
SPANDSPHASH=df1282eb9af538ab1aadb6d66146e258451d4fe4
SDSPVER=3.0.0
SDSPREL=45
SDSPREL=46

## Git hash for libstirshaken
## https://github.com/signalwire/libstirshaken
Expand Down
2 changes: 2 additions & 0 deletions includes/Makefile.spandsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ spandsp-shell:
$(addprefix $(DEBDEST)/,$(SDSPDEBS)): $(addprefix $(BUILDSOURCE)/,$(SDSPDEBS)) | $(DEBDEST)
cp $(BUILDSOURCE)/$(@F) $@

SDSPPDEST=$(BUILDSOURCE)/$(SDSPPREFIX)/debian/patches
$(addprefix $(BUILDSOURCE)/,$(SDSPDEBS)): $(BUILDSOURCE)/$(SDSPFILENAME) $(BASEDOCKERTAG)
rm -rf $(BUILDSOURCE)/$(SDSPPREFIX) && mkdir -p $(BUILDSOURCE) && cd $(BUILDSOURCE) && tar xf $<
./genchangelog.sh spandsp "$(SDSPVER)-$(SDSPREL)" $(BUILDSOURCE)/$(SDSPPREFIX) "Git hash $(SPANDSPHASH)"
mkdir -p $(SDSPPDEST); for p in $(ROOT)/patches/spandsp/*; do cp $$p $(SDSPPDEST)/ && echo $$(basename $$p) >> $(SDSPPDEST)/series; done
docker run --rm $(VOLUMES) -it -w /usr/local/build/SOURCES/$(SDSPPREFIX) basedocker:$(VERSION) dpkg-buildpackage -us -uc

$(DOWNLOADS)/$(SDSPFILENAME): | $(DOWNLOADS)
Expand Down
17 changes: 17 additions & 0 deletions patches/spandsp/001-fix-libdir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Description: Fix libdir location
Everything assumes that libs are going to be in the correct $host folder,
but it was changed in d9681c3747ff4f to override it to /usr/lib64, which
then breaks packaging of things that are trying to glob lib64/*/libspandsp*
when there's nothing to match the *

--- spandsp-3.0.0.orig/configure.ac
+++ spandsp-3.0.0/configure.ac
@@ -270,7 +270,7 @@ then
case "${host}" in
x86_64-*)
# X86_64 Linux machines may have both 64 bit and 32 bit libraries. We need to choose the right set
- AX_CHECK_REAL_FILE([${prefix}/lib64], libdir='${exec_prefix}/lib64')
+ AX_CHECK_REAL_FILE([${prefix}/lib64/${host}], libdir='${exec_prefix}/lib64/${host}')
AX_CHECK_REAL_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
# The very oldest AMD 64 bit chips support SSE2, SSE and MMX
enable_sse2="yes"

1 comment on commit 7924f4a

@xrobau
Copy link
Owner Author

@xrobau xrobau commented on 7924f4a Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes freeswitch/spandsp#65 but really, the libdir override shouldn't be there AT ALL.

Please sign in to comment.