Skip to content

Commit

Permalink
Ports: Add libtheora
Browse files Browse the repository at this point in the history
  • Loading branch information
gmta authored and linusg committed Apr 27, 2021
1 parent 504d622 commit c1c6002
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ports/AvailablePorts.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`libogg`](libogg/) | libogg | 1.3.4 | https://github.com/xiph/ogg |
| [`libpng`](libpng/) | libpng | 1.6.37 | https://libpng.org/ |
| [`libpuffy`](libpuffy/) | libpuffy | 1.0 | https://github.com/ibara/libpuffy |
| [`libtheora`](libtheora/) | libtheora | 1.1.1 | https://www.theora.org/ |
| [`libtiff`](libtiff/) | libtiff | 4.2.0 | http:https://www.libtiff.org/ |
| [`libtool`](libtool/) | libtool | 2.4 | https://www.gnu.org/software/libtool/ |
| [`libvorbis`](libvorbis/) | libvorbis | 1.3.7 | https://github.com/xiph/vorbis |
Expand Down
21 changes: 21 additions & 0 deletions Ports/libtheora/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=libtheora
version=1.1.1
useconfigure=true
files="https://downloads.xiph.org/releases/theora/libtheora-${version}.tar.bz2 libtheora-${version}.tar.bz2 b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
auth_type="sha256"
depends="libvorbis"
configopts="--disable-examples"

build_shared() {
local name=$1
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.so -Wl,-soname,${name}.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.a -Wl,--no-whole-archive
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/${name}.la
}

install() {
run make DESTDIR=${SERENITY_INSTALL_ROOT} $installopts install
build_shared libtheora
build_shared libtheoradec
build_shared libtheoraenc
}
11 changes: 11 additions & 0 deletions Ports/libtheora/patches/config.sub.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libtheora-1.1.1/config.sub 2009-02-24 04:50:50.000000000 +0100
+++ libtheora-1.1.1-patched/config.sub 2021-04-27 21:07:46.414544609 +0200
@@ -1093,7 +1093,7 @@
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -serenity* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \

0 comments on commit c1c6002

Please sign in to comment.