1
0
forked from ports/opt

shared-mime-info: adopted port

This commit is contained in:
Tim Biermann 2023-08-19 11:11:46 +02:00
parent dc6adf06e6
commit 606fc60f02
4 changed files with 26 additions and 123 deletions

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/d9tSL5UuoORTCBTz/1MAEJEdwbSEka7ultDNtgvbcg4xT92aWiRwHnsjjNeEFGa6acr+jXTh8CsF+SUXML0YAE=
SHA256 (Pkgfile) = 4744a2b8e37f0b8b97b62271321e375bcd7a6ed9ffa1c24c1eca3f7896104d9a
RWSE3ohX2g5d/VhLIEgvzMDueV2HhbPyvB30H2lzVz+EsIteS5ZebQxFKzWQmKbvFu2y2EsPG0vwAtTDef9vcPcYICPERPb0ig4=
SHA256 (Pkgfile) = d0c494d330258f5138da5476604f0df77dd0b3c83861fe297e8b67d7fad46bb7
SHA256 (.footprint) = 55be4f76a93fcb609d369a81599212f6274333e1a9313025370795e0be3f742e
SHA256 (shared-mime-info-2.2.tar.bz2) = 418c480019d9865f67f922dfb88de00e9f38bf971205d55cdffab50432919e61
SHA256 (xdgmime-fe2f298fa691b225bdea31d816cf6728df91ba6d.tar.bz2) = 7487ef577c6143639ec30f43d79aa538d97f9c0d3340a873731b7072696a4ef0

View File

@ -1,37 +1,40 @@
# Description: Core database of common types
# URL: https://freedesktop.org/Software/shared-mime-info
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: glib libxml2 itstool
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: glib itstool
name=shared-mime-info
version=2.2
release=1
release=2
# https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/xdgmime
_xdgmimever=fe2f298fa691b225bdea31d816cf6728df91ba6d
source=(https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/$version/$name-$version.tar.bz2
https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/$_xdgmimever/xdgmime-$_xdgmimever.tar.bz2)
https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/$_xdgmimever/xdgmime-$_xdgmimever.tar.bz2)
build() {
# Build mime database
meson setup xdgmime-$_xdgmimever xdgmime-build \
--prefix=/usr \
--buildtype=plain \
--wrap-mode nodownload \
-D b_pie=true
meson compile -C xdgmime-build
# Build mime database
meson setup xdgmime-$_xdgmimever xdgmime-build \
--prefix=/usr \
--buildtype=plain \
--wrap-mode nodownload \
-D b_pie=true
meson compile -C xdgmime-build
meson $name-$version build \
--prefix=/usr \
--buildtype=plain \
-D update-mimedb=false \
-D xdgmime-path=$SRC/xdgmime-build
meson compile -C build
DESTDIR=$PKG meson install -C build
meson setup $name-$version build \
--prefix=/usr \
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
-D update-mimedb=false \
-D xdgmime-path=$SRC/xdgmime-build
meson compile -C build
DESTDIR=$PKG meson install -C build
# Builds the initial database
/usr/bin/env PKGSYSTEM_ENABLE_FSYNC=0 $PKG/usr/bin/update-mime-database $PKG/usr/share/mime
# Builds the initial database
/usr/bin/env PKGSYSTEM_ENABLE_FSYNC=0 $PKG/usr/bin/update-mime-database $PKG/usr/share/mime
rm -r $PKG/usr/share/locale
rm -r $PKG/usr/share/locale
}

View File

@ -1,43 +0,0 @@
diff -Naur shared-mime-info-2.1.orig/data/freedesktop_generate.sh shared-mime-info-2.1/data/freedesktop_generate.sh
--- shared-mime-info-2.1.orig/data/freedesktop_generate.sh 2021-12-14 00:28:02.284628243 +0100
+++ shared-mime-info-2.1/data/freedesktop_generate.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-#!/bin/sh -e
-
-src_root="$1"
-build_root="$2"
-
-ninja -C "${build_root}" shared-mime-info-gmo
-
-itstool \
- --its "${src_root}/data/its/shared-mime-info.its" \
- --join "${src_root}/data/freedesktop.org.xml.in" \
- -o "${build_root}/data/freedesktop.org.xml" \
- "${build_root}/po/"*".gmo"
diff -Naur shared-mime-info-2.1.orig/data/meson.build shared-mime-info-2.1/data/meson.build
--- shared-mime-info-2.1.orig/data/meson.build 2021-12-14 00:28:02.285628247 +0100
+++ shared-mime-info-2.1/data/meson.build 2021-12-14 00:29:28.972927773 +0100
@@ -1,18 +1,12 @@
install_man('update-mime-database.1')
-freedesktop_org_xml = custom_target('freedesktop.org.xml',
- input : files(
- 'freedesktop.org.xml.in',
- 'its/shared-mime-info.its',
- 'its/shared-mime-info.loc',
- ),
+freedesktop_org_xml = i18n.merge_file(
+ input: 'freedesktop.org.xml.in',
output: 'freedesktop.org.xml',
- command: [
- find_program('freedesktop_generate.sh'),
- meson.source_root(),
- meson.build_root()
- ],
+ data_dirs: '.',
+ po_dir: '../po',
+ type: 'xml',
install: true,
install_dir: get_option('datadir') / 'mime' / 'packages',
)

View File

@ -1,57 +0,0 @@
diff -Naur shared-mime-info-2.1.orig/data/meson.build shared-mime-info-2.1/data/meson.build
--- shared-mime-info-2.1.orig/data/meson.build 2021-01-19 10:15:58.618356556 +0000
+++ shared-mime-info-2.1/data/meson.build 2021-01-19 10:17:06.897894749 +0000
@@ -21,15 +21,3 @@
[ 'its/shared-mime-info.loc', 'its/shared-mime-info.its', ],
install_dir : get_option('datadir') / 'gettext/its'
)
-
-custom_target('shared-mime-info-spec-html',
- input : 'shared-mime-info-spec.xml',
- output: 'shared-mime-info-spec-html',
- command: [
- xmlto,
- '-o', '@OUTPUT@',
- 'html-nochunks',
- '@INPUT@',
- ],
- build_by_default: true,
-)
diff -Naur shared-mime-info-2.1.orig/meson.build shared-mime-info-2.1/meson.build
--- shared-mime-info-2.1.orig/meson.build 2021-01-19 10:15:58.618356556 +0000
+++ shared-mime-info-2.1/meson.build 2021-01-19 10:16:36.042893679 +0000
@@ -20,9 +20,7 @@
###############################################################################
# Find tools
-itstool = find_program('itstool')
-xmllint = find_program('xmllint')
-xmlto = find_program('xmlto')
+# Nobody needs that.. c'mon upstream!
###############################################################################
# Find xdgmime
diff -Naur shared-mime-info-2.1.orig/tests/meson.build shared-mime-info-2.1/tests/meson.build
--- shared-mime-info-2.1.orig/tests/meson.build 2021-01-19 10:15:58.625362460 +0000
+++ shared-mime-info-2.1/tests/meson.build 2021-01-19 10:18:15.237483548 +0000
@@ -47,11 +47,6 @@
args: freedesktop_org_xml,
)
-test('xmllint freedesktop.org.xml',
- xmllint,
- args: [ '--noout', '--valid', freedesktop_org_xml, ],
-)
-
test('Case sensitivity',
find_program('test-case-sensitivity.sh'),
)
@@ -63,8 +58,3 @@
its20_elements_rng = meson.source_root() / 'data/its/its20-elements.rng'
shared_mime_info_its = meson.source_root() / 'data/its/shared-mime-info.its'
-
-test('ITS validation',
- xmllint,
- args: [ '--noout', '--relaxng', its20_elements_rng, shared_mime_info_its, ],
-)