Initial commit

This commit is contained in:
EnumDev committed 2026-09-18 16:28:47 +03:00
commit bc5fcdfcad
5 files changed
+151

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
# Ignore BPM archives and signatures
*.bpm
*.bpm.sig
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# Github repository
REPO="mircomir/jxrlib"
# Get tag name using Github Rest API
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[].name' | grep -v -i 'rc' | head -n1)
echo "$TAG_NAME"
+19
View File
@@ -0,0 +1,19 @@
name: jxrlib
description: Open source implementation of jpegxr
version: 1.3.9
revision: 1
url: https://github.com/mircomir/jxrlib
license: BSD-2-Clause
maintainers:
- [email protected]
architecture: any
type: source
depends:
- glibc
make_depends:
- cmake
downloads:
- url: https://github.com/mircomir/jxrlib/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 123e04fe9e06d55b985d1a2a938761a7f7580743c717594787734e9bc657b9f6
+26
View File
@@ -0,0 +1,26 @@
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
mv CMakeLists.txt -t "$BPM_SOURCE" # CMakeLists file from Arch Linux
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
export CFLAGS="${CFLAGS} -Wno-incompatible-pointer-types"
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
DESTDIR="$BPM_OUTPUT" cmake --install build
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/jxrlib/LICENSE
}
+94
View File
@@ -0,0 +1,94 @@
cmake_minimum_required(VERSION 3.5)
project(jxrlib C CXX)
set(JXRLIB_MAJOR 0)
set(JXRLIB_MINOR 0)
set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0)
set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR})
#find_package(JNI)
#if (JNI_FOUND)
# message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
# message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
# message (STATUS "JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}")
# message (STATUS "JAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2}")
#endif()
#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
#INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
include(TestBigEndian)
test_big_endian(ISBIGENDIAN)
if(ISBIGENDIAN)
set(DEF_ENDIAN -D_BIG__ENDIAN_)
endif()
add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN})
include_directories(
common/include
image/sys
jxrgluelib
jxrtestlib
)
# JXR Library
file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c)
file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h)
add_library(jpegxr SHARED ${jpegxr_SRC} ${jpegxr_HDR})
set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
install(TARGETS jpegxr
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
# JXR-GLUE Library
file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c)
file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h)
add_library(jxrglue SHARED ${jxrglue_SRC} ${jxrglue_HDR})
set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
target_link_libraries(jxrglue jpegxr m)
install(TARGETS jxrglue
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
# JXR-JAVA Library
#file(GLOB jxrjava_SRC java/target/swig/JXR_wrap.cxx cpp/lib/*.cpp)
#file(GLOB jxrjava_SRC cpp/lib/*.hpp)
#add_library(jxrjava SHARED ${jxrjava_SRC} ${jxrjava_HDR})
#set_target_properties(jxrjava PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION})
#target_link_libraries(jxrjava jpegxr m)
#install(TARGETS jxrjava
# RUNTIME DESTINATION bin
# LIBRARY DESTINATION lib${LIB_SUFFIX}
# ARCHIVE DESTINATION lib${LIB_SUFFIX}
#)
# JxrEncApp Executable
add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c)
target_link_libraries(JxrEncApp jxrglue)
install(TARGETS JxrEncApp RUNTIME DESTINATION bin)
# JxrDecApp Executable
add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c)
target_link_libraries(JxrDecApp jxrglue)
install(TARGETS JxrDecApp RUNTIME DESTINATION bin)
# Headers
install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h
DESTINATION include/jxrlib
)
install(DIRECTORY common/include/ DESTINATION include/jxrlib
FILES_MATCHING PATTERN "*.h"
)