1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[docker] Adjusted djgpp to openssl-1.1.1w and brotli-1.1.0

This commit is contained in:
Witold Filipczyk 2023-10-29 16:36:16 +01:00
parent 33d119ba2f
commit c423c68004
3 changed files with 11 additions and 128 deletions

View File

@ -23,7 +23,7 @@ rpm -Uhv *.rpm
RUN cd /root; mkdir zip; cd zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2tk/expat20br2.zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2tk/wat3211b.zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2tk/zlb1213b.zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2tk/zlb13b.zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2apps/xz-525a.zip; \
wget http://ftp.delorie.com/pub/djgpp/current/v2apps/bz2-108a.zip; \
wget https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.3/apps/sqlite.zip; \
@ -34,7 +34,7 @@ wget http://ftp.delorie.com/pub/djgpp/current/v2tk/lua522b.zip
RUN cd /root/zip; \
mkdir tmp; unzip expat20br2.zip -d tmp; cp -a tmp/include /usr/local/; cp -a tmp/lib /usr/local; rm -rf tmp; \
mkdir tmp; unzip wat3211b.zip -d tmp; mv -f tmp/net/watt/inc tmp/net/watt/include; cp -a tmp/net/watt/include /usr/local/; cp -a tmp/net/watt/lib /usr/local; rm -rf tmp; \
mkdir tmp; unzip zlb1213b.zip -d tmp; cp -a tmp/include /usr/local/; cp -a tmp/lib /usr/local/; rm -rf tmp; \
mkdir tmp; unzip zlb13b.zip -d tmp; cp -a tmp/include /usr/local/; cp -a tmp/lib /usr/local/; rm -rf tmp; \
mkdir tmp; unzip xz-525a.zip -d tmp; cp -a tmp/include /usr/local/; cp -a tmp/lib /usr/local/; rm -rf tmp; \
mkdir tmp; unzip bz2-108a.zip -d tmp; cp -a tmp/include /usr/local/; cp -a tmp/lib /usr/local/; rm -rf tmp; \
mkdir tmp; unzip sqlite.zip -d tmp; mkdir tmp/tmp2; unzip tmp/SOURCE/SQLITE/SOURCES.ZIP -d tmp/tmp2; cp -a tmp/tmp2/examples/sqlite3.h /usr/local/include/; cp -a tmp/tmp2/examples/libsqlite3.a /usr/local/lib/; \
@ -61,9 +61,9 @@ EOF
# openssl
RUN dnf -y install perl-FindBin; mkdir /root/tmp; cd /root/tmp; \
wget https://www.openssl.org/source/openssl-1.1.1u.tar.gz; \
tar -xf openssl-1.1.1u.tar.gz; \
cd openssl-1.1.1u; \
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz; \
tar -xf openssl-1.1.1w.tar.gz; \
cd openssl-1.1.1w; \
CFLAGS="-I/usr/local/include -DWATT32_NO_OLDIES -DSHUT_RD=0 -L/usr/local/lib -fcommon" \
./Configure no-threads \
no-tests \
@ -81,10 +81,10 @@ rm -rf /root/tmp
ADD cc.py /usr/local/bin/cc.py
ADD brotli.diff /root/brotli.diff
RUN mkdir /root/tmp; cd /root/tmp; \
wget https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz; \
tar -xf v1.0.9.tar.gz; \
cd brotli-1.0.9; \
patch -p1 < /root/brotli.diff; \
wget https://github.com/google/brotli/archive/refs/tags/v1.1.0.tar.gz; \
tar -xf v1.1.0.tar.gz; \
cd brotli-1.1.0; \
patch -p1 < /root/brotli.diff || exit 1; \
mkdir build; \
cd build; \
CC=cc.py cmake \

View File

@ -1,88 +1,3 @@
diff -Nru brotli-1.0.9.orig/CMakeLists.txt brotli-1.0.9/CMakeLists.txt
--- brotli-1.0.9.orig/CMakeLists.txt 2020-08-27 14:12:55.000000000 +0000
+++ brotli-1.0.9/CMakeLists.txt 2022-07-10 17:05:29.565513161 +0000
@@ -137,7 +137,7 @@
set(BROTLI_LIBRARIES ${BROTLI_LIBRARIES_CORE} ${LIBM_LIBRARY})
mark_as_advanced(BROTLI_LIBRARIES)
-set(BROTLI_LIBRARIES_CORE_STATIC brotlienc-static brotlidec-static brotlicommon-static)
+set(BROTLI_LIBRARIES_CORE_STATIC brotlienc brotlidec brotlicommon)
set(BROTLI_LIBRARIES_STATIC ${BROTLI_LIBRARIES_CORE_STATIC} ${LIBM_LIBRARY})
mark_as_advanced(BROTLI_LIBRARIES_STATIC)
@@ -160,19 +160,21 @@
transform_sources_list("scripts/sources.lst" "${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake")
-if(BROTLI_EMSCRIPTEN)
- set(BROTLI_SHARED_LIBS "")
-else()
- set(BROTLI_SHARED_LIBS brotlicommon brotlidec brotlienc)
- add_library(brotlicommon SHARED ${BROTLI_COMMON_C})
- add_library(brotlidec SHARED ${BROTLI_DEC_C})
- add_library(brotlienc SHARED ${BROTLI_ENC_C})
-endif()
-
-set(BROTLI_STATIC_LIBS brotlicommon-static brotlidec-static brotlienc-static)
-add_library(brotlicommon-static STATIC ${BROTLI_COMMON_C})
-add_library(brotlidec-static STATIC ${BROTLI_DEC_C})
-add_library(brotlienc-static STATIC ${BROTLI_ENC_C})
+#if(1
+# set(BROTLI_SHARED_LIBS "")
+#else()
+# set(BROTLI_SHARED_LIBS brotlicommon brotlidec brotlienc)
+# add_library(brotlicommon SHARED ${BROTLI_COMMON_C})
+# add_library(brotlidec SHARED ${BROTLI_DEC_C})
+# add_library(brotlienc SHARED ${BROTLI_ENC_C})
+#endif()
+
+set(BROTLI_SHARED_LIBS "")
+
+set(BROTLI_STATIC_LIBS brotlicommon brotlidec brotlienc)
+add_library(brotlicommon STATIC ${BROTLI_COMMON_C})
+add_library(brotlidec STATIC ${BROTLI_DEC_C})
+add_library(brotlienc STATIC ${BROTLI_ENC_C})
# Older CMake versions does not understand INCLUDE_DIRECTORIES property.
include_directories(${BROTLI_INCLUDE_DIRS})
@@ -195,13 +197,13 @@
set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}")
endforeach()
-if(NOT BROTLI_EMSCRIPTEN)
+#if(NOT BROTLI_EMSCRIPTEN)
+#target_link_libraries(brotlidec brotlicommon)
+#target_link_libraries(brotlienc brotlicommon)
+#endif()
+
target_link_libraries(brotlidec brotlicommon)
target_link_libraries(brotlienc brotlicommon)
-endif()
-
-target_link_libraries(brotlidec-static brotlicommon-static)
-target_link_libraries(brotlienc-static brotlicommon-static)
# For projects stuck on older versions of CMake, this will set the
# BROTLI_INCLUDE_DIRS and BROTLI_LIBRARIES variables so they still
@@ -226,12 +228,12 @@
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
- install(
- TARGETS ${BROTLI_LIBRARIES_CORE}
- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
- )
+# install(
+# TARGETS ${BROTLI_LIBRARIES_CORE}
+# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+# RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+# )
install(
TARGETS ${BROTLI_LIBRARIES_CORE_STATIC}
diff -Nru brotli-1.0.9.orig/c/common/platform.h brotli-1.0.9/c/common/platform.h
--- brotli-1.0.9.orig/c/common/platform.h 2020-08-27 14:12:55.000000000 +0000
+++ brotli-1.0.9/c/common/platform.h 2022-07-10 15:34:19.368776746 +0000
@ -95,35 +10,3 @@ diff -Nru brotli-1.0.9.orig/c/common/platform.h brotli-1.0.9/c/common/platform.h
#elif defined(OS_FREEBSD)
#include <machine/endian.h>
#elif defined(OS_MACOSX)
diff -Nru brotli-1.0.9.orig/scripts/libbrotlicommon.pc.in brotli-1.0.9/scripts/libbrotlicommon.pc.in
--- brotli-1.0.9.orig/scripts/libbrotlicommon.pc.in 2020-08-27 14:12:55.000000000 +0000
+++ brotli-1.0.9/scripts/libbrotlicommon.pc.in 2022-07-10 17:05:51.845405730 +0000
@@ -7,5 +7,5 @@
URL: https://github.com/google/brotli
Description: Brotli common dictionary library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlicommon
+Libs: -L${libdir} -lbrotlicommon
Cflags: -I${includedir}
diff -Nru brotli-1.0.9.orig/scripts/libbrotlidec.pc.in brotli-1.0.9/scripts/libbrotlidec.pc.in
--- brotli-1.0.9.orig/scripts/libbrotlidec.pc.in 2020-08-27 14:12:55.000000000 +0000
+++ brotli-1.0.9/scripts/libbrotlidec.pc.in 2022-07-10 17:06:06.013337085 +0000
@@ -7,6 +7,6 @@
URL: https://github.com/google/brotli
Description: Brotli decoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlidec
+Libs: -L${libdir} -lbrotlidec
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}
diff -Nru brotli-1.0.9.orig/scripts/libbrotlienc.pc.in brotli-1.0.9/scripts/libbrotlienc.pc.in
--- brotli-1.0.9.orig/scripts/libbrotlienc.pc.in 2020-08-27 14:12:55.000000000 +0000
+++ brotli-1.0.9/scripts/libbrotlienc.pc.in 2022-07-10 17:06:19.025273824 +0000
@@ -7,6 +7,6 @@
URL: https://github.com/google/brotli
Description: Brotli encoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlienc
+Libs: -L${libdir} -lbrotlienc
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}

View File

@ -5,8 +5,8 @@ rm -rf /tmp/builddir
LIBRARY_PATH="/usr/local/lib" \
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
C_INCLUDE_PATH="/usr/local/include" \
CFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE" \
CXXFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE" \
CFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE -DWATT32_NO_OLDIES" \
CXXFLAGS="-O2 -I/usr/local/include -DWATT32_NO_NAMESPACE -DWATT32_NO_OLDIES" \
LDFLAGS="-L/usr/local/lib" \
meson setup /tmp/builddir --cross-file cross/linux-djgpp.txt \
-D88-colors=false \