Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-cpp/fast_obj: new package #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-cpp/fast_obj/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST fast_obj-1.3.tar.gz 29764 BLAKE2B a829a34e689818490b0ec4181cdc19b9d82c364a5e9a1db3079dc121052981e0b7ae520695bf99b788dfd2dd88b92b508012515f636736080112bb95514922a7 SHA512 8db413ce3526a91be7834d7fcec23b012738d017d2e28e4fc212fd58c0f5ef7fe4e7aea07aaf440fdc3ec7e6a6bfa32ea777a344a166246bcfd7bd35938b359f
36 changes: 36 additions & 0 deletions dev-cpp/fast_obj/fast_obj-1.3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Fast C OBJ parser"

HOMEPAGE="https://github.com/thisistherk/fast_obj"

SRC_URI="https://github.com/thisistherk/fast_obj/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"

SLOT="0"

KEYWORDS="~amd64"

IUSE="test"

RESTRICT="!test? ( test )"

PATCHES=( ${FILESDIR}/static-to-shared.patch )

src_configure() {
local mycmakeargs=(
-DFAST_OBJ_BUILD_TEST=$(usex test)
)

cmake_src_configure
}

src_install() {
dolib.a "${BUILD_DIR}/libfast_obj_lib.a"
}
24 changes: 24 additions & 0 deletions dev-cpp/fast_obj/files/static-to-shared.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index 997f463..fd78e31 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -1,18 +1,18 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.5...3.31)

PROJECT(fast_obj)

OPTION(FAST_OBJ_BUILD_TEST "Build test application" OFF)

ADD_LIBRARY(fast_obj INTERFACE)
TARGET_INCLUDE_DIRECTORIES(fast_obj INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

-ADD_LIBRARY(fast_obj_lib STATIC fast_obj.c)
+ADD_LIBRARY(fast_obj_lib SHARED fast_obj.c)
TARGET_INCLUDE_DIRECTORIES(fast_obj_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})


IF(${FAST_OBJ_BUILD_TEST})
ADD_EXECUTABLE(fast_obj_test test/test.cpp)
TARGET_COMPILE_FEATURES(fast_obj_test PRIVATE cxx_std_11)
TARGET_LINK_LIBRARIES(fast_obj_test PRIVATE fast_obj_lib)
ENDIF()
11 changes: 11 additions & 0 deletions dev-cpp/fast_obj/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>zdanevich.vitaly@ya.ru</email>
<name>Vitaly Zdanevich</name>
</maintainer>
<upstream>
<remote-id type="github">nulloy/nulloy</remote-id>
</upstream>
</pkgmetadata>