freeimage: remove swab patch

Not needed with ndk-r23
This commit is contained in:
Henrik Grimler 2021-09-17 11:19:17 +02:00
parent 9869db7792
commit 4b62e1fe3b
5 changed files with 2 additions and 72 deletions

View File

@ -1,6 +1,6 @@
--- FreeImage/Makefile.gnu 2015-03-10 09:04:00.000000000 +0530
+++ FreeImage-patch/Makefile.gnu 2021-08-27 10:38:11.313999758 +0530
@@ -5,17 +5,20 @@
@@ -5,17 +5,18 @@
# General configuration variables:
DESTDIR ?= /
@ -8,8 +8,6 @@
-INSTALLDIR ?= $(DESTDIR)/usr/lib
+INCDIR ?= @TERMUX_PREFIX@/include
+INSTALLDIR ?= @TERMUX_PREFIX@/lib
+
+SRCS += Source/LibRawLite/internal/swab.cpp
# Converts cr/lf to just lf
DOS2UNIX = dos2unix

View File

@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="custom"
TERMUX_PKG_LICENSE_FILE="license-fi.txt, license-gplv2.txt, license-gplv3.txt, license-bsd-2-clause.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.18.0
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
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

View File

@ -1,11 +0,0 @@
--- 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] = {

View File

@ -1,10 +0,0 @@
--- 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"

View File

@ -1,47 +0,0 @@
--- <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);