diff --git a/media-libs/libwebp-1.6.0.PKGBUILD b/media-libs/libwebp-1.6.0.PKGBUILD new file mode 100644 index 0000000..6e4ff67 --- /dev/null +++ b/media-libs/libwebp-1.6.0.PKGBUILD @@ -0,0 +1,62 @@ +pkgname=libwebp +pkgver=1.6.0 +pkgdesc="WebP image codec library" +homepage="https://developers.google.com/speed/webp/" +arch=(x86_64) +license=(BSD-3-Clause) +depends=(glibc) +makedepends=( + libjpeg-turbo + libpng +) +_patches=("libwebp-1.2.3-libpng-pkg-config.patch" + "libwebp-1.6.0-configure-typo.patch" +) +_patchesums=("77b6bcc1313c330da70d6c6b0c7684a1" + "793de17d81cec98905b88aa373cbd16d" +) +sources=("${pkgname}-${pkgver}.tar.gz" + "${_patches[@]}" +) +urls=("https://storage.googleapis.com/downloads.webmproject.org/releases/webp/${sources[0]}" + "${_patches[@]}" +) +md5sums=("cceb6447180f961473b181c9ef38b630" + "${_patchesums[@]}" +) + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + for _patch in ${_patches[@]}; do + patch -p1 -i ${filedir}/${_patch} + done + autoreconf +} + +src_build() { + local confargs=( + --prefix=/usr + --enable-libwebpmux + --enable-libwebpdemux + --enable-libwebpdecoder + --disable-static + --disable-swap-16bit-csp + --enable-jpeg + --enable-png + --disable-gl + --disable-tiff + --enable-avx2 + --enable-sse2 + --enable-sse4.1 + --disable-gif + ) + ./configure "${confargs[@]}" + make +} + +src_install() { + make DESTDIR="${pkgdir}" install + install -Dm 644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname} +} + +# vim:ft=sh syn=sh et sw=2: diff --git a/media-libs/libwebp-1.6.0/libwebp-1.2.3-libpng-pkg-config.patch b/media-libs/libwebp-1.6.0/libwebp-1.2.3-libpng-pkg-config.patch new file mode 100644 index 0000000..b219206 --- /dev/null +++ b/media-libs/libwebp-1.6.0/libwebp-1.2.3-libpng-pkg-config.patch @@ -0,0 +1,52 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -518,42 +518,20 @@ AS_IF([test "x$enable_sdl" != "xno"], [ + AM_CONDITIONAL([BUILD_VWEBP_SDL], [test "$build_vwebp_sdl" = "yes"]) + + dnl === check for PNG support === ++PKG_PROG_PKG_CONFIG + + AC_ARG_ENABLE([png], AS_HELP_STRING([--disable-png], + [Disable detection of PNG format support + @<:@default=auto@:>@])) + AS_IF([test "x$enable_png" != "xno"], [ +- CLEAR_LIBVARS([PNG]) +- AC_PATH_PROGS([LIBPNG_CONFIG], +- [libpng-config libpng16-config libpng15-config libpng14-config \ +- libpng12-config]) +- if test -n "$LIBPNG_CONFIG"; then +- PNG_INCLUDES=`$LIBPNG_CONFIG --cflags` +- PNG_LIBS="`$LIBPNG_CONFIG --ldflags`" +- fi ++ LIBCHECK_PROLOGUE([PNG]) ++ PKG_CHECK_MODULES([LIBPNG], [libpng]) + +- WITHLIB_OPTION([png], [PNG]) ++ AC_DEFINE(WEBP_HAVE_PNG, [1], [Set to 1 if PNG library is installed]) ++ png_support=yes + +- LIBCHECK_PROLOGUE([PNG]) +- AC_CHECK_HEADER(png.h, +- AC_SEARCH_LIBS(png_get_libpng_ver, [png], +- [test "$ac_cv_search_png_get_libpng_ver" = "none required" \ +- || PNG_LIBS="$PNG_LIBS $ac_cv_search_png_get_libpng_ver" +- PNG_INCLUDES="$PNG_INCLUDES -DWEBP_HAVE_PNG" +- AC_DEFINE(WEBP_HAVE_PNG, [1], +- [Set to 1 if PNG library is installed]) +- png_support=yes +- ], +- [AC_MSG_WARN(Optional png library not found) +- PNG_LIBS="" +- PNG_INCLUDES="" +- ], +- [$MATH_LIBS]), +- [AC_MSG_WARN(png library not available - no png.h) +- PNG_LIBS="" +- PNG_INCLUDES="" +- ], +- ) ++ PNG_INCLUDES="${LIBPNG_CFLAGS} -DWEBP_HAVE_PNG" ++ PNG_LIBS="${LIBPNG_LIBS}" + LIBCHECK_EPILOGUE([PNG]) + ]) + diff --git a/media-libs/libwebp-1.6.0/libwebp-1.6.0-configure-typo.patch b/media-libs/libwebp-1.6.0/libwebp-1.6.0-configure-typo.patch new file mode 100644 index 0000000..fbeae71 --- /dev/null +++ b/media-libs/libwebp-1.6.0/libwebp-1.6.0-configure-typo.patch @@ -0,0 +1,13 @@ +Linebreaks aren't valid here. +--- a/configure.ac ++++ b/configure.ac +@@ -166,8 +166,7 @@ AC_ARG_ENABLE([avx2], + [Disable detection of AVX2 support + @<:@default=auto@:>@])) + +-AS_IF([test "x$enable_avx2" != "xno" -a "x$enable_sse4_1" != "xno" +- -a "x$enable_sse2" != "xno"], [ ++AS_IF([test "x$enable_avx2" != "xno" -a "x$enable_sse4_1" != "xno" -a "x$enable_sse2" != "xno"], [ + AVX2_FLAGS="$INTRINSICS_CFLAGS $AVX2_FLAGS" + TEST_AND_ADD_CFLAGS([AVX2_FLAGS], [-mavx2]) + AS_IF([test -n "$AVX2_FLAGS"], [