Skip to content

Commit

Permalink
Add Meson build system
Browse files Browse the repository at this point in the history
  • Loading branch information
tintou committed Dec 18, 2024
1 parent 1584f53 commit 89d4814
Show file tree
Hide file tree
Showing 109 changed files with 1,897 additions and 303 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab

[{meson.build,meson_options.txt}]
indent_size = 2
indent_style = space
17 changes: 3 additions & 14 deletions camlibs/adc65/adc65.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,16 @@
* <[email protected]>
* http://www.psnw.com/~smokeserpent/code/
*/
#include "config.h"

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-abilities-list.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define _(String) (String)
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
#include "libgphoto2/i18n.h"

#define GP_MODULE "adc65"

Expand Down
11 changes: 11 additions & 0 deletions camlibs/adc65/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
shared_module(
'adc65',
'adc65.c',
dependencies: [
libgphoto2_dep,
config_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
14 changes: 1 addition & 13 deletions camlibs/agfa-cl20/agfa_cl20.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,7 @@
#include <gphoto2/gphoto2-library.h>
#include <gphoto2/gphoto2-result.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
#include "libgphoto2/i18n.h"

#define GP_MODULE

Expand Down
11 changes: 11 additions & 0 deletions camlibs/agfa-cl20/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
shared_module(
'agfa_cl20',
'agfa_cl20.c',
dependencies: [
libgphoto2_dep,
config_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
14 changes: 1 addition & 13 deletions camlibs/aox/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,7 @@

#include <gphoto2/gphoto2.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
#include "libgphoto2/i18n.h"

#include "aox.h"
#include <gphoto2/gphoto2-port.h>
Expand Down
12 changes: 12 additions & 0 deletions camlibs/aox/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
shared_module(
'aox',
'library.c',
'aox.c',
'aox.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
23 changes: 23 additions & 0 deletions camlibs/ax203/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
shared_module(
'ax203',
'library.c',
'ax203.c',
'ax203.h',
'ax203_decode_yuv.c',
'ax203_decode_yuv_delta.c',
'ax203_compress_jpeg.c',
'jpeg_memsrcdest.h',
'jpeg_memsrcdest.c',
'tinyjpeg.c',
'tinyjpeg.h',
'tinyjpeg-internal.h',
'jidctflt.c',
dependencies: [
libgphoto2_dep,
libjpeg_dep,
libgd_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
10 changes: 10 additions & 0 deletions camlibs/barbie/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
shared_module(
'barbie',
'barbie.c',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
21 changes: 21 additions & 0 deletions camlibs/canon/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
shared_module(
'canon',
'canon.c',
'canon.h',
'library.c',
'library.h',
'serial.c',
'serial.h',
'usb.c',
'usb.h',
'crc.c',
'crc.h',
'util.c',
'util.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
18 changes: 18 additions & 0 deletions camlibs/casio/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
shared_module(
'casio_qv',
'casio-qv.c',
'casio-qv-commands.c',
'casio-qv-commands.h',
'camtojpeg.c',
'camtojpeg.h',
'cam2jpgtab.h',
'jpegtab_f.h',
'ycctoppm.c',
'ycctoppm.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
15 changes: 1 addition & 14 deletions camlibs/clicksmart310/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,7 @@
#define JPEG_QCIF_FORMAT 0x22
#define JPEG_CIF_FORMAT 0x21

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
# define ngettext(String1,String2,Count) ((Count==1)?String1:String2)
#endif
#include "libgphoto2/i18n.h"

#include "clicksmart.h"
#define GP_MODULE "clicksmart310"
Expand Down
14 changes: 14 additions & 0 deletions camlibs/clicksmart310/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
shared_module(
'clicksmart310',
'library.c',
'clicksmart.c',
'clicksmart.h',
'spca50x-jpeg-header.h',
dependencies: [
libgphoto2_dep,
config_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
14 changes: 1 addition & 13 deletions camlibs/digigr8/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,7 @@

#include <gphoto2/gphoto2.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
#include "libgphoto2/i18n.h"

#include "digigr8.h"

Expand Down
14 changes: 14 additions & 0 deletions camlibs/digigr8/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
shared_module(
'digigr8',
'library.c',
'digigr8.c',
'digigr8.h',
'digi_postprocess.c',
dependencies: [
libgphoto2_dep,
config_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
14 changes: 14 additions & 0 deletions camlibs/digita/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
shared_module(
'digita',
'digita.c',
'serial.c',
'usb.c',
'commands.c',
'digita.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
13 changes: 13 additions & 0 deletions camlibs/dimera/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
shared_module(
'dimera3500',
'dimera3500.c',
'mesalib.c',
'mesalib.h',
'dimeratab.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
10 changes: 10 additions & 0 deletions camlibs/directory/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
shared_module(
'directory',
'directory.c',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
17 changes: 17 additions & 0 deletions camlibs/docupen/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
shared_module(
'docupen',
'cache.c',
'calibration.c',
'docupen.c',
'docupen.h',
'huffman.c',
'huffman.h',
'image.c',
dependencies: [
libgphoto2_dep,
libgd_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
10 changes: 10 additions & 0 deletions camlibs/enigma13/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
shared_module(
'enigma13',
'enigma13.c',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
12 changes: 12 additions & 0 deletions camlibs/fuji/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
shared_module(
'fuji',
'library.c',
'fuji.c',
'fuji.h',
dependencies: [
libgphoto2_dep,
],
name_prefix: '',
install: true,
install_dir: camlibs_dir,
)
19 changes: 1 addition & 18 deletions camlibs/gsmart300/gsmart300.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,7 @@
#include "gsmart300.h"
#include "gsmart300-jpeg-header.h"

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif
#include "libgphoto2/i18n.h"

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define sleep(x)
Expand Down
Loading

0 comments on commit 89d4814

Please sign in to comment.