summaryrefslogtreecommitdiff
blob: c18d5f1329a2a410813bd5a29cf365b9d387f417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
https://github.com/shemminga/rotix/pull/3
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Fri, 15 Sep 2023 17:00:38 +0300
Subject: [PATCH 1/3] Implementing meson build-system

Replacing old configure/make system.
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,17 @@
+project('rotix', 'c', version: '0.83', license: 'GPL-2.0-or-later')
+cc = meson.get_compiler('c')
+
+if get_option('i18n')
+  subdir('po')
+endif
+
+if not cc.check_header('getopt.h')
+  add_project_arguments('-DNO_GETOPT_LONG=1', language:'c')
+endif
+
+
+src = ['help.c', 'rot.c', 'rotix.c']
+
+executable('rotix', sources: src, install: true)
+install_man('rotix.1')
+
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('i18n', type: 'boolean', value: true)
+
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1 @@
+nl
--- /dev/null
+++ b/po/POTFILES
@@ -0,0 +1,4 @@
+help.c
+rot.c
+rotix.c
+
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,10 @@
+i18n = import('i18n')
+
+add_project_arguments(
+  [
+    '-DI18N=1',
+    '-DPACKAGE="rotix"',
+    '-DLOCALEDIR="@0@"'.format( get_option('prefix') / get_option('localedir'))
+  ], language:'c')
+i18n.gettext(meson.project_name())
+
similarity index 100%
rename from po/NL.po
rename to po/nl.po
-- 
2.41.0