Skip to content

Commit

Permalink
koio: new port in devel
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 4, 2024
1 parent 23a5f9f commit a40a97a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
31 changes: 31 additions & 0 deletions devel/koio/Portfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup legacysupport 1.1
PortGroup meson 1.0
PortGroup sourcehut 1.0

# fmemopen
legacysupport.newest_darwin_requires_legacy 10

sourcehut.setup sircmpwn koio 0.1.2
categories devel
license BSD
maintainers nomaintainer
description ${name} is a tool & library for embedding files \
into C programs
long_description ${description}
checksums rmd160 5085a0ccb04c50840266223ff8fa99b046afcaee \
sha256 80a2bb627e4968a4266f663e90df57673d285dbbe797be53f099ba7f9bc65162 \
size 6064

# Remove invalid linker flag:
# ld: unknown option: --version-script
# Relax one warning-to-error:
# hashtable.c:7:77: error: expression does not compute the number of elements in this array;
# element type is 'struct ko_hashtable_entry *', not 'struct ko_hashtable_entry' [-Werror=sizeof-array-div]
patchfiles-append patch-meson.build.diff

compiler.c_standard 1999
compiler.blacklist-append \
*gcc-4.0 *gcc-4.2
24 changes: 24 additions & 0 deletions devel/koio/files/patch-meson.build.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- meson.build 2020-03-13 20:57:48.000000000 +0800
+++ meson.build 2024-12-04 10:27:36.000000000 +0800
@@ -18,11 +18,10 @@

add_project_arguments('-Wno-unused-parameter', language: 'c')

+add_project_arguments('-Wno-error=sizeof-array-div', language: 'c')
+
koio_inc = include_directories('include')

-symbols_file = 'koio.syms'
-symbols_flag = '-Wl,--version-script,@0@/@1@'.format(
- meson.current_source_dir(), symbols_file)
lib_koio = library(meson.project_name(),
[
'lib/ko_add_alias.c',
@@ -34,7 +33,6 @@
version: '.'.join(so_version),
include_directories: koio_inc,
install: true,
- link_args: symbols_flag,
)

install_headers('include/koio.h')

0 comments on commit a40a97a

Please sign in to comment.