Skip to content

Commit

Permalink
libobjc2: New package
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik committed Feb 4, 2024
1 parent 0034d03 commit 3d77297
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
53 changes: 53 additions & 0 deletions mingw-w64-gnustep-make/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Maintainer: Some One <[email protected]>

_realname=gnustep-make
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.9.1
pkgrel=1
pkgdesc="GNUstep build system (mingw-w64)"
arch=('any')
mingw_arch=('mingw64', 'ucrt64')
url='https://gnustep.github.org/'
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://www.somepackage.org/${_realname}/${_realname}-${pkgver}.tar.gz"
"0001-A-fix.patch")
sha256sums=('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"

patch -p1 -i "${srcdir}/0001-A-fix.patch"
}

build() {
cd "${srcdir}/${_realname}-${pkgver}"
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

../"${_realname}-${pkgver}"/configure \
--prefix="${MINGW_PREFIX}" \
--build="${MINGW_CHOST}" \
--host="${MINGW_CHOST}" \
--target="${MINGW_CHOST}" \
--enable-static \
--enable-shared

make
}

check() {
cd "${srcdir}/build-${MSYSTEM}"

make check
}

package() {
cd "${srcdir}/build-${MSYSTEM}"

make install DESTDIR="${pkgdir}"

install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
1 change: 1 addition & 0 deletions mingw-w64-libobjc2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libobjc2-*/
61 changes: 61 additions & 0 deletions mingw-w64-libobjc2/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Maintainer: Frederik Carlier <[email protected]>

_realname=libobjc2
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.2
pkgrel=1
pkgdesc="Objective-C runtime library intended for use with Clang. (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64')
url="https://github.com/gnustep/libobjc2"
license=('LICENSE')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-clang"
"${MINGW_PACKAGE_PREFIX}-lld"
'git')
source=("${_realname}-${pkgver}::git+https://github.com/gnustep/$_realname.git#tag=v${pkgver}")
sha256sums=('SKIP')

prepare() {
cd ${srcdir}/${_realname}-${pkgver}
}

build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi

export LDFLAGS="-fuse-ld=lld -lstdc++ -lgcc_s"

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_PREFIX}"/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DCMAKE_C_COMPILER="clang" \
-DCMAKE_CXX_COMPILER="clang++" \
-DTESTS=ON \
"${extra_config[@]}" \
../${_realname}-${pkgver}

"${MINGW_PREFIX}"/bin/cmake.exe --build .
}

check() {
cd "${srcdir}/build-${MSYSTEM}"

"${MINGW_PREFIX}"/bin/cmake.exe --build . --target test
}

package() {
cd "${srcdir}/build-${MSYSTEM}"

DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install .

install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}

0 comments on commit 3d77297

Please sign in to comment.