Skip to content

Commit

Permalink
libzling-20160108 (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
fd00 committed Jan 12, 2025
1 parent b594f1f commit b5517d5
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 0 deletions.
67 changes: 67 additions & 0 deletions libzling/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
libzling
------------------------------------------
Fast and niubility compression library

Runtime requirements:
cygwin-3.5.4-1
libgcc1-12.4.0-3
libstdc++6-12.4.0-3
libzling-devel-20160108-1bl1
libzling0-20160108-1bl1
pkg-config-2.3.0-1

Build requirements:
(besides corresponding -devel packages)
binutils-2.43.1-1
cmake-3.28.3-1
cygport-0.36.9-1
gcc-core-12.4.0-3
gcc-g++-12.4.0-3
ninja-1.12.0-1

Canonical website:
https://github.com/richox/libzling

Canonical download:
https://github.com/richox/libzling/archive/refs/tags/20160108.tar.gz

-------------------------------------------

Build instructions:
1. unpack libzling-20160108-X-src.tar.xz
2. if you use setup to install this src package,
it will be unpacked under /usr/src automatically
% cd /usr/src
% cygport ./libzling-20160108-X.cygport all

This will create:
/usr/src/libzling-20160108-X-src.tar.xz
/usr/src/libzling-20160108-X.tar.xz
/usr/src/libzling0-20160108-X.tar.xz
/usr/src/libzling-devel-20160108-X.tar.xz

-------------------------------------------

Files included in the binary package:

(libzling)
/usr/bin/zling_demo.exe
/usr/share/doc/Cygwin/libzling.README
/usr/share/doc/libzling/README.md

(libzling0)
/usr/bin/cygzling-0.dll

(libzling-devel)
/usr/include/libzling/libzling.h
/usr/include/libzling/libzling_inc.h
/usr/include/libzling/libzling_utils.h
/usr/lib/libzling.dll.a
/usr/lib/pkgconfig/libzling.pc

------------------

Port Notes:

----- version 20160108-1bl1 -----
Initial release by fd0 <https://github.com/fd00/>
46 changes: 46 additions & 0 deletions libzling/libzling-20160108-1bl1.cygport
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
HOMEPAGE="https://github.com/richox/${PN}"
SRC_URI="https://github.com/richox/${PN}/archive/refs/tags/${PV}.tar.gz"

CATEGORY="Libs"
SUMMARY="Fast and niubility compression library"
DESCRIPTION="${SUMMARY}"

LICENSE="BSD-3-Clause"
LICENSE_SPDX="SPDX-License-Identifier: BSD-3-Clause"
# LICENSE_URI=""

inherit cmake

CYGCMAKE_ARGS="
-DSOVERSION:STRING=0
-DVERSION:STRING=${PV}
"

src_compile()
{
cd ${B}
: ${CYGCMAKE_GENERATOR=Ninja}
CYGCMAKE_SOURCE="${S}/build"
cygcmake
cygninja
}

PKG_NAMES="
libzling
libzling0
libzling-devel
"
libzling_CONTENTS="
usr/bin/*.exe
usr/share
"
libzling0_CONTENTS="
usr/bin/cyg*-0.dll
"
libzling_devel_CONTENTS="
usr/include
usr/lib
"
libzling_SUMMARY="${SUMMARY} (utilities)"
libzling0_SUMMARY="${SUMMARY} (runtime)"
libzling_devel_SUMMARY="${SUMMARY} (development)"
66 changes: 66 additions & 0 deletions libzling/libzling-20160108-1bl1.src.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--- origsrc/libzling-20160108/build/CMakeLists.txt 2015-12-25 23:28:51.000000000 +0900
+++ src/libzling-20160108/build/CMakeLists.txt 2025-01-12 10:04:08.069751800 +0900
@@ -3,25 +3,40 @@ project(libzling)
cmake_minimum_required(VERSION 2.8)

# source path
-aux_source_directory("../src" DIR_SRC)
-aux_source_directory("../demo" DIR_DEMO)
+aux_source_directory("${CMAKE_SOURCE_DIR}/../src" DIR_SRC)
+aux_source_directory("${CMAKE_SOURCE_DIR}/../demo" DIR_DEMO)

file(COPY "../src/libzling.h" DESTINATION "./include/libzling")
file(COPY "../src/libzling_utils.h" DESTINATION "./include/libzling")
file(COPY "../src/libzling_inc.h" DESTINATION "./include/libzling")
-file(COPY "../src/msinttypes" DESTINATION "./include/libzling")
+if (MSVC)
+ file(COPY "../src/msinttypes" DESTINATION "./include/libzling")
+endif()

-include_directories("./include")
+include_directories(${CMAKE_BINARY_DIR}/include)

add_library(zling SHARED ${DIR_SRC})
add_executable(zling_demo ${DIR_DEMO})

target_link_libraries(zling_demo zling)

+if (DEFINED SOVERSION)
+ set_target_properties(zling PROPERTIES SOVERSION "${SOVERSION}")
+endif()
+
# install
-install(FILES "../src/libzling.h" DESTINATION "./include/libzling")
-install(FILES "../src/libzling_utils.h" DESTINATION "./include/libzling")
-install(FILES "../src/libzling_inc.h" DESTINATION "./include/libzling")
-install(DIRECTORY "../src/msinttypes" DESTINATION "./include/libzling")
-install(TARGETS zling DESTINATION "./lib")
-install(TARGETS zling_demo DESTINATION "./bin")
+install(FILES "../src/libzling.h" DESTINATION include/libzling)
+install(FILES "../src/libzling_utils.h" DESTINATION include/libzling)
+install(FILES "../src/libzling_inc.h" DESTINATION include/libzling)
+if (MSVC)
+ install(DIRECTORY "../src/msinttypes" DESTINATION include/libzling)
+endif()
+install(TARGETS zling RUNTIME DESTINATION bin ARCHIVE DESTINATION lib)
+install(TARGETS zling_demo DESTINATION bin)
+
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
+set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+set(includedir ${CMAKE_INSTALL_PREFIX}/include)
+configure_file(${CMAKE_SOURCE_DIR}/libzling.pc.in ${CMAKE_BINARY_DIR}/libzling.pc @ONLY)
+install(FILES ${CMAKE_BINARY_DIR}/libzling.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
--- origsrc/libzling-20160108/build/libzling.pc.in 1970-01-01 09:00:00.000000000 +0900
+++ src/libzling-20160108/build/libzling.pc.in 2025-01-12 10:02:29.444040600 +0900
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libzling
+Description: Fast and niubility compression library
+Version: @VERSION@
+Libs: -L${libdir} -lzling
+Cflags: -I${includedir}

0 comments on commit b5517d5

Please sign in to comment.