diff options
Diffstat (limited to 'libraries/libopenraw')
-rw-r--r-- | libraries/libopenraw/README | 6 | ||||
-rw-r--r-- | libraries/libopenraw/libopenraw.SlackBuild | 40 | ||||
-rw-r--r-- | libraries/libopenraw/libopenraw.info | 8 | ||||
-rw-r--r-- | libraries/libopenraw/mkvendored.sh | 44 |
4 files changed, 84 insertions, 14 deletions
diff --git a/libraries/libopenraw/README b/libraries/libopenraw/README index 97b4cb906917..c9f61a4bfa03 100644 --- a/libraries/libopenraw/README +++ b/libraries/libopenraw/README @@ -1,8 +1,10 @@ +libopenraw (a library for camera RAW file decoding) + libopenraw is an ongoing project to provide a free software implementation for camera RAW files decoding. One of the main -reason is that dcraw is not suited for easy integration into +reasons is that dcraw is not suited for easy integration into applications, and there is a need for an easy to use API to build free software digital image processing application. -It also has the goal to address missing feature from dcraw +It also has the goal to address missing features from dcraw like meta-data decoding and easy thumbnail extraction. diff --git a/libraries/libopenraw/libopenraw.SlackBuild b/libraries/libopenraw/libopenraw.SlackBuild index e2c363502d26..2c62b6204221 100644 --- a/libraries/libopenraw/libopenraw.SlackBuild +++ b/libraries/libopenraw/libopenraw.SlackBuild @@ -26,6 +26,11 @@ # Now maintained by B. Watson <yalhcru@gmail.com> +# 20211124 bkw: +# - update for v0.3.0. upstream started using rust, so: +# - figure out how to use 'cargo vendor' so the build can be done +# without network access. see mkvendored.sh for details. + # 20191231 bkw: # - take over maintenance # - update for v0.1.3 @@ -38,7 +43,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=libopenraw -VERSION=${VERSION:-0.1.3} +VERSION=${VERSION:-0.3.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -51,9 +56,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -83,12 +85,24 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-vendored-sources-$VERSION-$BUILD.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# 20211124 bkw: whoops, missing include... +sed -i '1i#include <limits>' lib/cr2file.cpp + +# 20211124 bkw: prevent cargo from using the network. +# this only works because we have a vendored sources tarball with +# everything cargo would have downloaded. +export CARGO_NET_OFFLINE=true + +# 20211124 bkw: prevent cargo from writing outside of $TMP +export CARGO_HOME=$(pwd)/.cargo + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -105,15 +119,23 @@ CXXFLAGS="$SLKCFLAGS" \ make V=1 make install-strip DESTDIR=$PKG -# for whatever reason, upstream v0.0.9 calls itself v1.0 in pkg-config, -# but v0.1.3 calls itself v0.1. this causes raw-thumbnailer builds to -# fail. use symlinks as a workaround. +# for whatever reason, upstream v0.0.9 calls itself v1.0 in +# pkg-config, but v0.1.3 calls itself v0.1 (and v0.3.0 calls itself +# v0.3). this causes raw-thumbnailer builds to fail. use symlinks as +# a workaround. +MMVER=$( echo $VERSION | cut -d. -f1,2 ) cd $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig for i in $PRGNAM $PRGNAM-gnome; do - [ -e $i-0.1.pc ] && ln -s $i-0.1.pc $i-1.0.pc + pcfile=$i-$MMVER.pc + sed -i '/^Requires:/s,0\.1,'$MMVER',' $pcfile + ln -s $pcfile $i-1.0.pc done cd - +# This is really dumb. + +find $PKG/usr/lib$LIBDIRSUFFIX -name '*.la' -delete + # this looks useful mkdir -p $PKG/usr/bin install -s -m0755 -oroot -groot tools/.libs/ordiag $PKG/usr/bin diff --git a/libraries/libopenraw/libopenraw.info b/libraries/libopenraw/libopenraw.info index e64dcae0d801..c353cbda4c13 100644 --- a/libraries/libopenraw/libopenraw.info +++ b/libraries/libopenraw/libopenraw.info @@ -1,8 +1,10 @@ PRGNAM="libopenraw" -VERSION="0.1.3" +VERSION="0.3.0" HOMEPAGE="https://libopenraw.freedesktop.org/libopenraw/" -DOWNLOAD="http://libopenraw.freedesktop.org/download/libopenraw-0.1.3.tar.bz2" -MD5SUM="ac147fea61af7e8a949e9cbeb5cb8aa5" +DOWNLOAD="https://libopenraw.freedesktop.org/download/libopenraw-0.3.0.tar.bz2 \ + https://slackware.uk/~urchlay/src/libopenraw-vendored-sources-0.3.0-1.tar.xz" +MD5SUM="82b5638a60b20199a0f68983b3039edf \ + 1e287aeeae6a2a91daf164a4d58d92a3" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/libraries/libopenraw/mkvendored.sh b/libraries/libopenraw/mkvendored.sh new file mode 100644 index 000000000000..0d70bc8abd54 --- /dev/null +++ b/libraries/libopenraw/mkvendored.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# 20211124 bkw: mkvendored.sh, part of libopenraw SBo SlackBuild. +# create libopenraw-vendored-sources-$VERSION-$BUILD.tar.xz +# requires network access, but does not require root privilege. + +PRGNAM=libopenraw +CWD=$(pwd) +source ./$PRGNAM.info + +set -e +WORKDIR=$( mktemp -d ) +cd $WORKDIR + +# don't depend on user's ~/.cargo +mkdir -p cargohome +export CARGO_HOME=$(pwd)/cargohome + +grep '^BUILD=' $CWD/$PRGNAM.SlackBuild > 1 +source ./1 + +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION/lib/mp4 + +for i in . mp4parse mp4parse_capi; do + cd $i + cargo vendor + find vendor -type f -a -name \*.a -print0 | xargs -0 rm -f + mkdir -p .cargo + cat <<EOF >.cargo/config.toml +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + cd - +done + +cd $WORKDIR +tar cvfJ $CWD/libopenraw-vendored-sources-$VERSION-$BUILD.tar.xz \ + $PRGNAM-$VERSION/lib/mp4/{,mp4parse/,mp4parse_capi/}{vendor,.cargo} +cd $CWD +rm -rf $WORKDIR |