new package: freeimage (#5637)
This commit is contained in:
parent
e1c93f0854
commit
a65bb1d803
15
packages/freeimage/Makefile.gnu.patch
Normal file
15
packages/freeimage/Makefile.gnu.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/Makefile.gnu
|
||||
+++ b/Makefile.gnu
|
||||
@@ -71,9 +71,9 @@
|
||||
|
||||
install:
|
||||
install -d $(INCDIR) $(INSTALLDIR)
|
||||
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
|
||||
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
|
||||
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
|
||||
+ install -m 644 $(HEADER) $(INCDIR)
|
||||
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
|
||||
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
|
||||
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
|
||||
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
|
||||
# ldconfig
|
9
packages/freeimage/Makefile.src.patch
Normal file
9
packages/freeimage/Makefile.src.patch
Normal file
File diff suppressed because one or more lines are too long
14
packages/freeimage/build.sh
Normal file
14
packages/freeimage/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://freeimage.sourceforge.io
|
||||
TERMUX_PKG_DESCRIPTION="The library project for developers who would like to support popular graphics image formats."
|
||||
TERMUX_PKG_LICENSE="custom"
|
||||
TERMUX_PKG_LICENSE_FILE="license-fi.txt, license-gplv2.txt, license-gplv3.txt, license-bsd-2-clause.txt"
|
||||
TERMUX_PKG_VERSION=3.18.0
|
||||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/freeimage/Source%20Distribution/${TERMUX_PKG_VERSION}/FreeImage${TERMUX_PKG_VERSION//./}.zip
|
||||
TERMUX_PKG_SHA256=f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="DESTDIR=${TERMUX_PREFIX}/../"
|
||||
TERMUX_PKG_MAKE_INSTALL_TARGET="DESTDIR=${TERMUX_PREFIX}/../ install"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
cp -f $TERMUX_PKG_BUILDER_DIR/license-bsd-2-clause.txt $TERMUX_PKG_SRCDIR/
|
||||
}
|
11
packages/freeimage/dcraw_common.patch
Normal file
11
packages/freeimage/dcraw_common.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/Source/LibRawLite/internal/dcraw_common.cpp.old 2020-07-31 15:05:19.932910536 +0000
|
||||
+++ b/Source/LibRawLite/internal/dcraw_common.cpp 2020-07-31 15:07:53.161921895 +0000
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "libraw/libraw.h"
|
||||
#include "internal/defines.h"
|
||||
#include "internal/var_defines.h"
|
||||
+#include <swab.h>
|
||||
int CLASS fcol(int row, int col)
|
||||
{
|
||||
static const char filter[16][16] = {
|
||||
|
10
packages/freeimage/libraw_cxx.patch
Normal file
10
packages/freeimage/libraw_cxx.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/Source/LibRawLite/src/libraw_cxx.cpp
|
||||
+++ b/Source/LibRawLite/src/libraw_cxx.cpp
|
||||
@@ -51,6 +51,8 @@
|
||||
#include "dng_simple_image.h"
|
||||
#include "dng_info.h"
|
||||
#endif
|
||||
+
|
||||
+#include "swab.h"
|
||||
|
||||
#include "libraw_fuji_compressed.cpp"
|
25
packages/freeimage/license-bsd-2-clause.txt
Normal file
25
packages/freeimage/license-bsd-2-clause.txt
Normal file
@ -0,0 +1,25 @@
|
||||
Copyright (C) 2017 The Android Open Source Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
47
packages/freeimage/swab.patch
Normal file
47
packages/freeimage/swab.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- <null>
|
||||
+++ b/Source/LibRawLite/internal/swab.cpp
|
||||
@@ -0,0 +1,39 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 The Android Open Source Project
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions
|
||||
+ * are met:
|
||||
+ * * Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer.
|
||||
+ * * Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in
|
||||
+ * the documentation and/or other materials provided with the
|
||||
+ * distribution.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
+ * SUCH DAMAGE.
|
||||
+ */
|
||||
+#include <unistd.h>
|
||||
+void swab(const void* void_src, void* void_dst, ssize_t byte_count) {
|
||||
+ const uint8_t* src = static_cast<const uint8_t*>(void_src);
|
||||
+ uint8_t* dst = static_cast<uint8_t*>(void_dst);
|
||||
+ while (byte_count > 1) {
|
||||
+ uint8_t x = *src++;
|
||||
+ uint8_t y = *src++;
|
||||
+ *dst++ = y;
|
||||
+ *dst++ = x;
|
||||
+ byte_count -= 2;
|
||||
+ }
|
||||
+}
|
||||
|
||||
--- <null>
|
||||
+++ b/Source/LibRawLite/internal/swab.h
|
||||
@@ -0,0 +1 @@
|
||||
+void swab(const void* __src, void* __dst, ssize_t __byte_count);
|
Loading…
Reference in New Issue
Block a user