freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] * meson.build: Fix build for other UNIX


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] * meson.build: Fix build for other UNIX systems (e.g., FreeBSD).
Date: Mon, 12 Jul 2021 20:24:48 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-07-12  Alex Richardson  <Alexander.Richardson@cl.cam.ac.uk>
    
    2
    +
    
    3
    +	* meson.build: Fix build for other UNIX systems (e.g., FreeBSD).
    
    4
    +
    
    5
    +	Without this change the build of `unix/ftsystem.c` fails because the
    
    6
    +	`ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and
    
    7
    +	`HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin
    
    8
    +	systems:
    
    9
    +
    
    10
    +	```
    
    11
    +	.../builds/unix/ftsystem.c:258:32: error:
    
    12
    +	    use of undeclared identifier 'O_RDONLY'
    
    13
    +	file = open( filepathname, O_RDONLY );
    
    14
    +	```
    
    15
    +
    
    16
    +	Instead of hardcoding a list of operating systems for this check,
    
    17
    +	update the logic that decides whether to build the file and set a
    
    18
    +	boolean flag that can be checked instead.
    
    19
    +
    
    1 20
     2021-07-12  Werner Lemberg  <wl@gnu.org>
    
    2 21
     
    
    3 22
     	[autofit] More clean-ups.
    

  • meson.build
    ... ... @@ -193,6 +193,7 @@ has_sys_mman_h = cc.has_header('sys/mman.h')
    193 193
     
    
    194 194
     mmap_option = get_option('mmap')
    
    195 195
     
    
    196
    +use_unix_ftsystem_c = false
    
    196 197
     if mmap_option.disabled()
    
    197 198
       ft2_sources += files(['src/base/ftsystem.c',])
    
    198 199
     elif host_machine.system() == 'windows'
    
    ... ... @@ -201,6 +202,7 @@ else
    201 202
       if has_unistd_h and has_fcntl_h and has_sys_mman_h
    
    202 203
         # This version of `ftsystem.c` uses `mmap` to read input font files.
    
    203 204
         ft2_sources += files(['builds/unix/ftsystem.c',])
    
    205
    +    use_unix_ftsystem_c = true
    
    204 206
       elif mmap_option.enabled()
    
    205 207
         error('mmap was enabled via options but is not available,'
    
    206 208
               + ' required headers were not found!')
    
    ... ... @@ -321,7 +323,7 @@ if has_fcntl_h
    321 323
       ftconfig_command += '--enable=HAVE_FCNTL_H'
    
    322 324
     endif
    
    323 325
     
    
    324
    -if host_machine.system() in ['linux', 'darwin', 'cygwin']
    
    326
    +if use_unix_ftsystem_c
    
    325 327
       ftconfig_h_in = files('builds/unix/ftconfig.h.in')
    
    326 328
       ftconfig_h = custom_target('ftconfig.h',
    
    327 329
         input: ftconfig_h_in,
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]