diff --git a/ChangeLog.md b/ChangeLog.md index 67af381c95b35..33f14669d0149 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,6 +20,11 @@ See docs/process.md for more on how version tagging works. 3.1.54 (in development) ----------------------- +- Added `--use-port` option to `emcc`. This option allows ports to be enabled + by name and is designed to replace all existing `-sUSE_XXX` settings for + ports. You can use `--show-ports` to get the list of available ports that + can be used with this new option. (#21214) + 3.1.53 - 01/29/24 ----------------- diff --git a/docs/emcc.txt b/docs/emcc.txt index 25902a2453a87..1d2c7900000fa 100644 --- a/docs/emcc.txt +++ b/docs/emcc.txt @@ -466,6 +466,12 @@ Options that are modified or new in *emcc* are listed below: By default this will also clear any download ports since the ports directory is usually within the cache directory. +"--use-port=" + [compile+link] Use the specified port. If you need to use more than + one port you can use this argument multiple times. For example: "-- + use-port=sdl2 --use-port=bzip2". To get the list of available + ports, use "--show-ports". + "--clear-ports" [general] Manually clears the local copies of ports from the Emscripten Ports repos (sdl2, etc.). This also clears the cache, to diff --git a/emcc.py b/emcc.py index aab996257d50d..32a82e274fe93 100644 --- a/emcc.py +++ b/emcc.py @@ -1405,6 +1405,8 @@ def consume_arg_file(): options.target = consume_arg() if options.target not in ('wasm32', 'wasm64', 'wasm64-unknown-emscripten', 'wasm32-unknown-emscripten'): exit_with_error(f'unsupported target: {options.target} (emcc only supports wasm64-unknown-emscripten and wasm32-unknown-emscripten)') + elif check_arg('--use-port'): + ports.handle_use_port_arg(settings, consume_arg()) elif arg == '-mllvm': # Ignore the next argument rather than trying to parse it. This is needed # because llvm args could, for example, start with `-o` and we don't want diff --git a/site/source/docs/compiling/Building-Projects.rst b/site/source/docs/compiling/Building-Projects.rst index 18ec988297d1d..fd8b798353a70 100644 --- a/site/source/docs/compiling/Building-Projects.rst +++ b/site/source/docs/compiling/Building-Projects.rst @@ -215,17 +215,19 @@ For example, consider the case where a project "project" uses a library "libstuf Emscripten Ports ================ -Emscripten Ports is a collection of useful libraries, ported to Emscripten. They reside `on GitHub `_, and have integration support in *emcc*. When you request that a port be used, emcc will fetch it from the remote server, set it up and build it locally, then link it with your project, add necessary include to your build commands, etc. For example, SDL2 is in ports, and you can request that it be used with ``-sUSE_SDL=2``. For example, +Emscripten Ports is a collection of useful libraries, ported to Emscripten. They reside `on GitHub `_, and have integration support in *emcc*. When you request that a port be used, emcc will fetch it from the remote server, set it up and build it locally, then link it with your project, add necessary include to your build commands, etc. For example, SDL2 is in ports, and you can request that it be used with ``--use-port=sdl2``. For example, .. code-block:: bash - emcc test/sdl2glshader.c -sUSE_SDL=2 -sLEGACY_GL_EMULATION -o sdl2.html + emcc test/browser/test_sdl2_glshader.c --use-port=sdl2 -sLEGACY_GL_EMULATION -o sdl2.html You should see some notifications about SDL2 being used, and built if it wasn't previously. You can then view ``sdl2.html`` in your browser. -.. note:: *SDL_image* has also been added to ports, use it with ``-sUSE_SDL_IMAGE=2``. To see a list of all available ports, run ``emcc --show-ports``. For SDL2_image to be useful, you generally need to specify the image formats you are planning on using with e.g. ``-sSDL2_IMAGE_FORMATS='["bmp","png","xpm"]'`` (note: jpg support is not available yet as of Jun 22 2018 - libjpg needs to be added to emscripten-ports). This will also ensure that ``IMG_Init`` works properly when you specify those formats. Alternatively, you can use ``emcc --use-preload-plugins`` and ``--preload-file`` your images, so the browser codecs decode them (see :ref:`preloading-files`). A code path in the SDL2_image port will load through :c:func:`emscripten_get_preloaded_image_data`, but then your calls to ``IMG_Init`` with those image formats will fail (as while the images will work through preloading, IMG_Init reports no support for those formats, as it doesn't have support compiled in - in other words, IMG_Init does not report support for formats that only work through preloading).``` +To see a list of all available ports, run ``emcc --show-ports``. -.. note:: *SDL_net* has also been added to ports, use it with ``-sUSE_SDL_NET=2``. To see a list of all available ports, run ``emcc --show-ports``. +.. note:: *SDL_image* has also been added to ports, use it with ``--use-port=sdl2_image``. For ``sdl2_image`` to be useful, you generally need to specify the image formats you are planning on using with e.g. ``-sSDL2_IMAGE_FORMATS='["bmp","png","xpm","jpg"]'``. This will also ensure that ``IMG_Init`` works properly when you specify those formats. Alternatively, you can use ``emcc --use-preload-plugins`` and ``--preload-file`` your images, so the browser codecs decode them (see :ref:`preloading-files`). A code path in the ``sdl2_image`` port will load through :c:func:`emscripten_get_preloaded_image_data`, but then your calls to ``IMG_Init`` with those image formats will fail (as while the images will work through preloading, IMG_Init reports no support for those formats, as it doesn't have support compiled in - in other words, IMG_Init does not report support for formats that only work through preloading).``` + +.. note:: *SDL_net* has also been added to ports, use it with ``--use-port=sdl2_net``. .. note:: Emscripten also has support for older SDL1, which is built-in. If you do not specify SDL2 as in the command above, then SDL1 is linked in and the SDL1 include paths are used. SDL1 has support for *sdl-config*, which is present in `system/bin `_. Using the native *sdl-config* may result in compilation or missing-symbol errors. You will need to modify the build system to look for files in **emscripten/system** or **emscripten/system/bin** in order to use the Emscripten *sdl-config*. @@ -236,6 +238,9 @@ You should see some notifications about SDL2 being used, and built if it wasn't it's better to use the ports version as it is what is tested and known to work. +.. note:: Since emscripten 3.1.54, ``--use-port`` is the preferred syntax to use a port in your project. The legacy syntax (for example ``-sUSE_SDL2``, ``-sUSE_SDL_IMAGE=2``) remains available. + + Adding more ports ----------------- diff --git a/site/source/docs/tools_reference/emcc.rst b/site/source/docs/tools_reference/emcc.rst index 8527aa4f3f531..7885ed3cbe6b0 100644 --- a/site/source/docs/tools_reference/emcc.rst +++ b/site/source/docs/tools_reference/emcc.rst @@ -455,6 +455,14 @@ Options that are modified or new in *emcc* are listed below: By default this will also clear any download ports since the ports directory is usually within the cache directory. +.. _emcc-use-port: + +``--use-port=`` + [compile+link] + Use the specified port. If you need to use more than one port you can use this + argument multiple times. For example: ``--use-port=sdl2 --use-port=bzip2``. + To get the list of available ports, use ``--show-ports``. + .. _emcc-clear-ports: ``--clear-ports`` diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index 1c1048be5f9d9..2e399acfda1d6 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -1849,6 +1849,7 @@ Specify the SDL version that is being linked against. 2 is a port of the SDL C code on emscripten-ports When AUTO_JS_LIBRARIES is set to 0 this defaults to 0 and SDL is not linked in. +Alternate syntax for using the port: --use-port=sdl2 .. note:: Applicable during both linking and compilation @@ -1894,6 +1895,7 @@ USE_ICU ======= 1 = use icu from emscripten-ports +Alternate syntax: --use-port=icu .. note:: Applicable during both linking and compilation @@ -1903,6 +1905,7 @@ USE_ZLIB ======== 1 = use zlib from emscripten-ports +Alternate syntax: --use-port=zlib .. note:: Applicable during both linking and compilation @@ -1912,6 +1915,7 @@ USE_BZIP2 ========= 1 = use bzip2 from emscripten-ports +Alternate syntax: --use-port=bzip2 .. note:: Applicable during both linking and compilation @@ -1921,6 +1925,7 @@ USE_GIFLIB ========== 1 = use giflib from emscripten-ports +Alternate syntax: --use-port=giflib .. note:: Applicable during both linking and compilation @@ -1930,6 +1935,7 @@ USE_LIBJPEG =========== 1 = use libjpeg from emscripten-ports +Alternate syntax: --use-port=libjpeg .. note:: Applicable during both linking and compilation @@ -1939,6 +1945,7 @@ USE_LIBPNG ========== 1 = use libpng from emscripten-ports +Alternate syntax: --use-port=libpng .. note:: Applicable during both linking and compilation @@ -1948,6 +1955,7 @@ USE_REGAL ========= 1 = use Regal from emscripten-ports +Alternate syntax: --use-port=regal .. note:: Applicable during both linking and compilation @@ -1957,6 +1965,7 @@ USE_BOOST_HEADERS ================= 1 = use Boost headers from emscripten-ports +Alternate syntax: --use-port=boost_headers .. note:: Applicable during both linking and compilation @@ -1966,6 +1975,7 @@ USE_BULLET ========== 1 = use bullet from emscripten-ports +Alternate syntax: --use-port=bullet .. note:: Applicable during both linking and compilation @@ -1975,6 +1985,7 @@ USE_VORBIS ========== 1 = use vorbis from emscripten-ports +Alternate syntax: --use-port=vorbis .. note:: Applicable during both linking and compilation @@ -1984,6 +1995,7 @@ USE_OGG ======= 1 = use ogg from emscripten-ports +Alternate syntax: --use-port=ogg .. note:: Applicable during both linking and compilation @@ -1993,6 +2005,7 @@ USE_MPG123 ========== 1 = use mpg123 from emscripten-ports +Alternate syntax: --use-port=mpg123 .. note:: Applicable during both linking and compilation @@ -2002,6 +2015,7 @@ USE_FREETYPE ============ 1 = use freetype from emscripten-ports +Alternate syntax: --use-port=freetype .. note:: Applicable during both linking and compilation @@ -2021,6 +2035,7 @@ USE_HARFBUZZ ============ 1 = use harfbuzz from harfbuzz upstream +Alternate syntax: --use-port=harfbuzz .. note:: Applicable during both linking and compilation @@ -2030,6 +2045,7 @@ USE_COCOS2D =========== 3 = use cocos2d v3 from emscripten-ports +Alternate syntax: --use-port=cocos2d .. note:: Applicable during both linking and compilation @@ -2039,6 +2055,7 @@ USE_MODPLUG =========== 1 = use libmodplug from emscripten-ports +Alternate syntax: --use-port=libmodplug .. note:: Applicable during both linking and compilation @@ -2063,6 +2080,7 @@ USE_SQLITE3 =========== 1 = use sqlite3 from emscripten-ports +Alternate syntax: --use-port=sqlite3 .. note:: Applicable during both linking and compilation diff --git a/src/settings.js b/src/settings.js index bb417e8cc564e..df9e86b40e063 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1455,6 +1455,7 @@ var LEGALIZE_JS_FFI = true; // 2 is a port of the SDL C code on emscripten-ports // When AUTO_JS_LIBRARIES is set to 0 this defaults to 0 and SDL // is not linked in. +// Alternate syntax for using the port: --use-port=sdl2 // [compile+link] var USE_SDL = 0; @@ -1475,54 +1476,67 @@ var USE_SDL_TTF = 1; var USE_SDL_NET = 1; // 1 = use icu from emscripten-ports +// Alternate syntax: --use-port=icu // [compile+link] var USE_ICU = false; // 1 = use zlib from emscripten-ports +// Alternate syntax: --use-port=zlib // [compile+link] var USE_ZLIB = false; // 1 = use bzip2 from emscripten-ports +// Alternate syntax: --use-port=bzip2 // [compile+link] var USE_BZIP2 = false; // 1 = use giflib from emscripten-ports +// Alternate syntax: --use-port=giflib // [compile+link] var USE_GIFLIB = false; // 1 = use libjpeg from emscripten-ports +// Alternate syntax: --use-port=libjpeg // [compile+link] var USE_LIBJPEG = false; // 1 = use libpng from emscripten-ports +// Alternate syntax: --use-port=libpng // [compile+link] var USE_LIBPNG = false; // 1 = use Regal from emscripten-ports +// Alternate syntax: --use-port=regal // [compile+link] var USE_REGAL = false; // 1 = use Boost headers from emscripten-ports +// Alternate syntax: --use-port=boost_headers // [compile+link] var USE_BOOST_HEADERS = false; // 1 = use bullet from emscripten-ports +// Alternate syntax: --use-port=bullet // [compile+link] var USE_BULLET = false; // 1 = use vorbis from emscripten-ports +// Alternate syntax: --use-port=vorbis // [compile+link] var USE_VORBIS = false; // 1 = use ogg from emscripten-ports +// Alternate syntax: --use-port=ogg // [compile+link] var USE_OGG = false; // 1 = use mpg123 from emscripten-ports +// Alternate syntax: --use-port=mpg123 // [compile+link] var USE_MPG123 = false; // 1 = use freetype from emscripten-ports +// Alternate syntax: --use-port=freetype // [compile+link] var USE_FREETYPE = false; @@ -1532,14 +1546,17 @@ var USE_FREETYPE = false; var USE_SDL_MIXER = 1; // 1 = use harfbuzz from harfbuzz upstream +// Alternate syntax: --use-port=harfbuzz // [compile+link] var USE_HARFBUZZ = false; // 3 = use cocos2d v3 from emscripten-ports +// Alternate syntax: --use-port=cocos2d // [compile+link] var USE_COCOS2D = 0; // 1 = use libmodplug from emscripten-ports +// Alternate syntax: --use-port=libmodplug // [compile+link] var USE_MODPLUG = false; @@ -1553,6 +1570,7 @@ var SDL2_IMAGE_FORMATS = []; var SDL2_MIXER_FORMATS = ["ogg"]; // 1 = use sqlite3 from emscripten-ports +// Alternate syntax: --use-port=sqlite3 // [compile+link] var USE_SQLITE3 = false; diff --git a/test/test_other.py b/test/test_other.py index f221ba21fc86a..b57daee40318b 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2259,20 +2259,25 @@ def test_sdl_scan_code_from_key(self): def test_sdl2_mixer_wav(self): self.emcc(test_file('browser/test_sdl2_mixer_wav.c'), ['-sUSE_SDL_MIXER=2'], output_filename='a.out.js') + self.emcc(test_file('browser/test_sdl2_mixer_wav.c'), ['--use-port=sdl2_mixer'], output_filename='a.out.js') def test_sdl2_linkable(self): # Ensure that SDL2 can be built with LINKABLE. This implies there are no undefined # symbols in the library (because LINKABLE includes the entire library). self.emcc(test_file('browser/test_sdl2_misc.c'), ['-sLINKABLE', '-sUSE_SDL=2'], output_filename='a.out.js') + self.emcc(test_file('browser/test_sdl2_misc.c'), ['-sLINKABLE', '--use-port=sdl2'], output_filename='a.out.js') def test_sdl2_gfx_linkable(self): # Same as above but for sdl2_gfx library self.emcc(test_file('browser/test_sdl2_misc.c'), ['-Wl,-fatal-warnings', '-sLINKABLE', '-sUSE_SDL_GFX=2'], output_filename='a.out.js') + self.emcc(test_file('browser/test_sdl2_misc.c'), ['-Wl,-fatal-warnings', '-sLINKABLE', '--use-port=sdl2_gfx'], output_filename='a.out.js') def test_libpng(self): shutil.copyfile(test_file('third_party/libpng/pngtest.png'), 'pngtest.png') self.do_runf('third_party/libpng/pngtest.c', 'libpng passes test', emcc_args=['--embed-file', 'pngtest.png', '-sUSE_LIBPNG']) + self.do_runf('third_party/libpng/pngtest.c', 'libpng passes test', + emcc_args=['--embed-file', 'pngtest.png', '--use-port=libpng']) @node_pthreads def test_libpng_with_pthreads(self): @@ -2293,23 +2298,34 @@ def test_giflib(self): 'GIF file terminated normally', emcc_args=['--embed-file', 'treescap.gif', '-sUSE_GIFLIB', '-sMAIN_MODULE'], args=['treescap.gif']) + self.do_runf('third_party/giflib/giftext.c', + 'GIF file terminated normally', + emcc_args=['--embed-file', 'treescap.gif', '--use-port=giflib'], + args=['treescap.gif']) def test_libjpeg(self): shutil.copyfile(test_file('screenshot.jpg'), 'screenshot.jpg') self.do_runf('jpeg_test.c', 'Image is 600 by 450 with 3 components', emcc_args=['--embed-file', 'screenshot.jpg', '-sUSE_LIBJPEG'], args=['screenshot.jpg']) + self.do_runf('jpeg_test.c', 'Image is 600 by 450 with 3 components', + emcc_args=['--embed-file', 'screenshot.jpg', '--use-port=libjpeg'], + args=['screenshot.jpg']) def test_bullet(self): self.do_runf('bullet_hello_world.cpp', 'BULLET RUNNING', emcc_args=['-sUSE_BULLET']) + self.do_runf('bullet_hello_world.cpp', 'BULLET RUNNING', emcc_args=['--use-port=bullet']) def test_vorbis(self): # This will also test if ogg compiles, because vorbis depends on ogg self.do_runf('vorbis_test.c', 'ALL OK', emcc_args=['-sUSE_VORBIS']) + self.do_runf('vorbis_test.c', 'ALL OK', emcc_args=['--use-port=vorbis']) def test_bzip2(self): self.do_runf('bzip2_test.c', 'usage: unzcrash filename', emcc_args=['-sUSE_BZIP2', '-Wno-pointer-sign']) + self.do_runf('bzip2_test.c', 'usage: unzcrash filename', + emcc_args=['--use-port=bzip2', '-Wno-pointer-sign']) @with_both_sjlj def test_freetype(self): @@ -2337,6 +2353,8 @@ def test_freetype(self): # build test program with the font file embed in it self.do_runf('freetype_test.c', expectedOutput, emcc_args=['-sUSE_FREETYPE', '--embed-file', 'LiberationSansBold.ttf']) + self.do_runf('freetype_test.c', expectedOutput, + emcc_args=['--use-port=freetype', '--embed-file', 'LiberationSansBold.ttf']) def test_freetype_with_pthreads(self): # Verify that freetype supports compilation requiring pthreads @@ -2349,6 +2367,7 @@ def test_icu(self): def test_sdl2_ttf(self): # This is a compile-only to test to verify that sdl2-ttf (and freetype and harfbuzz) are buildable. self.emcc(test_file('browser/test_sdl2_ttf.c'), args=['-sUSE_SDL=2', '-sUSE_SDL_TTF=2'], output_filename='a.out.js') + self.emcc(test_file('browser/test_sdl2_ttf.c'), args=['--use-port=sdl2', '--use-port=sdl2_ttf'], output_filename='a.out.js') def test_link_memcpy(self): # memcpy can show up *after* optimizations, so after our opportunity to link in libc, so it must be special-cased @@ -11429,6 +11448,7 @@ def test_em_asm_invalid(self): def test_boost_graph(self): self.do_runf('test_boost_graph.cpp', emcc_args=['-std=c++14', '-sUSE_BOOST_HEADERS']) + self.do_runf('test_boost_graph.cpp', emcc_args=['-std=c++14', '--use-port=boost_headers']) def test_setjmp_em_asm(self): create_file('src.c', ''' diff --git a/test/test_sanity.py b/test/test_sanity.py index 41465a59f5030..4f26ad520bb6a 100644 --- a/test/test_sanity.py +++ b/test/test_sanity.py @@ -529,9 +529,9 @@ def test_emcc_ports(self): # listing ports out = self.do([EMCC, '--show-ports']) self.assertContained('Available ports:', out) - self.assertContained('SDL2', out) - self.assertContained('SDL2_image', out) - self.assertContained('SDL2_net', out) + self.assertContained('sdl2', out) + self.assertContained('sdl2_image', out) + self.assertContained('sdl2_net', out) # using ports RETRIEVING_MESSAGE = 'retrieving port' diff --git a/tools/ports/__init__.py b/tools/ports/__init__.py index 50b2c333e476a..71df3d0c2c6c4 100644 --- a/tools/ports/__init__.py +++ b/tools/ports/__init__.py @@ -22,6 +22,8 @@ ports_by_name = {} +ports_needed = set() + # Variant builds that we want to support for certain ports # {variant_name: (port_name, extra_settings)} port_variants = {} @@ -31,39 +33,49 @@ logger = logging.getLogger('ports') +def load_port(name): + expected_attrs = ['get', 'clear', 'show'] + port = __import__(name, globals(), level=1) + ports.append(port) + port.name = name + ports_by_name[port.name] = port + for a in expected_attrs: + assert hasattr(port, a), 'port %s is missing %s' % (port, a) + if not hasattr(port, 'needed'): + port.needed = lambda s: name in ports_needed + else: + needed = port.needed + port.needed = lambda s: needed(s) or name in ports_needed + if not hasattr(port, 'process_dependencies'): + port.process_dependencies = lambda x: 0 + if not hasattr(port, 'linker_setup'): + port.linker_setup = lambda x, y: 0 + if not hasattr(port, 'deps'): + port.deps = [] + if not hasattr(port, 'process_args'): + port.process_args = lambda x: [] + if not hasattr(port, 'variants'): + # port variants (default: no variants) + port.variants = {} + + for variant, extra_settings in port.variants.items(): + if variant in port_variants: + utils.exit_with_error('duplicate port variant: %s' % variant) + port_variants[variant] = (port.name, extra_settings) + + @ToolchainProfiler.profile() def read_ports(): - expected_attrs = ['get', 'clear', 'show', 'needed'] for filename in os.listdir(ports_dir): if not filename.endswith('.py') or filename == '__init__.py': continue filename = os.path.splitext(filename)[0] - port = __import__(filename, globals(), level=1) - ports.append(port) - port.name = filename - ports_by_name[port.name] = port - for a in expected_attrs: - assert hasattr(port, a), 'port %s is missing %s' % (port, a) - if not hasattr(port, 'process_dependencies'): - port.process_dependencies = lambda x: 0 - if not hasattr(port, 'linker_setup'): - port.linker_setup = lambda x, y: 0 - if not hasattr(port, 'deps'): - port.deps = [] - if not hasattr(port, 'process_args'): - port.process_args = lambda x: [] - if not hasattr(port, 'variants'): - # port variants (default: no variants) - port.variants = {} - - for variant, extra_settings in port.variants.items(): - if variant in port_variants: - utils.exit_with_error('duplicate port variant: %s' % variant) - port_variants[variant] = (port.name, extra_settings) - - for dep in port.deps: - if dep not in ports_by_name: - utils.exit_with_error('unknown dependency in port: %s' % dep) + load_port(filename) + + for port in ports: + for dep in port.deps: + if dep not in ports_by_name: + utils.exit_with_error('unknown dependency in port: %s' % dep) def get_all_files_under(dirname): @@ -361,6 +373,12 @@ def add_deps(node): add_deps(port) +def handle_use_port_arg(settings, name): + if name not in ports_by_name: + utils.exit_with_error(f'Invalid port name: {name} used with --use-port') + ports_needed.add(name) + + def get_needed_ports(settings): # Start with directly needed ports, and transitively add dependencies needed = set(p for p in ports if p.needed(settings)) @@ -424,7 +442,7 @@ def add_cflags(args, settings): # noqa: U100 def show_ports(): print('Available ports:') - for port in ports: + for port in sorted(ports, key=lambda p: p.name): print(' ', port.show()) diff --git a/tools/ports/boost_headers.py b/tools/ports/boost_headers.py index 087970563e07d..47288838e79f4 100644 --- a/tools/ports/boost_headers.py +++ b/tools/ports/boost_headers.py @@ -44,4 +44,4 @@ def process_args(ports): def show(): - return 'Boost headers v1.70.0 (USE_BOOST_HEADERS=1; Boost license)' + return 'boost_headers - Boost headers v1.70.0 (-sUSE_BOOST_HEADERS=1 or --use-port=boost_headers; Boost license)' diff --git a/tools/ports/bullet.py b/tools/ports/bullet.py index 0f6dedc1ef9ea..a91c0b69b6285 100644 --- a/tools/ports/bullet.py +++ b/tools/ports/bullet.py @@ -56,4 +56,4 @@ def process_args(ports): def show(): - return 'bullet (USE_BULLET=1; zlib license)' + return 'bullet (-sUSE_BULLET=1 or --use-port=bullet; zlib license)' diff --git a/tools/ports/bzip2.py b/tools/ports/bzip2.py index b1b7605563ed8..a1e8c9d49d267 100644 --- a/tools/ports/bzip2.py +++ b/tools/ports/bzip2.py @@ -35,4 +35,4 @@ def clear(ports, settings, shared): def show(): - return 'bzip2 (USE_BZIP2=1; BSD license)' + return 'bzip2 (-sUSE_BZIP2=1 or --use-port=bzip2; BSD license)' diff --git a/tools/ports/cocos2d.py b/tools/ports/cocos2d.py index 6ffe7cb790872..685e3b50e0610 100644 --- a/tools/ports/cocos2d.py +++ b/tools/ports/cocos2d.py @@ -74,7 +74,7 @@ def process_args(ports): def show(): - return 'cocos2d' + return 'cocos2d (-sUSE_COCOS2D=3 or --use-port=cocos2d)' def make_source_list(cocos2d_root, cocos2dx_root): diff --git a/tools/ports/freetype.py b/tools/ports/freetype.py index d419bd53c6189..117fdcb7819bc 100644 --- a/tools/ports/freetype.py +++ b/tools/ports/freetype.py @@ -116,7 +116,7 @@ def process_args(ports): def show(): - return 'freetype (USE_FREETYPE=1; freetype license)' + return 'freetype (-sUSE_FREETYPE=1 or --use-port=freetype; freetype license)' ftconf_h = r'''/***************************************************************************/ diff --git a/tools/ports/giflib.py b/tools/ports/giflib.py index efc549ca543b1..ecc554e3edd73 100644 --- a/tools/ports/giflib.py +++ b/tools/ports/giflib.py @@ -34,4 +34,4 @@ def clear(ports, settings, shared): def show(): - return 'giflib (USE_GIFLIB=1; MIT license)' + return 'giflib (-sUSE_GIFLIB=1 or --use-port=giflib; MIT license)' diff --git a/tools/ports/harfbuzz.py b/tools/ports/harfbuzz.py index 73d35c7d8a127..e376d2743573c 100644 --- a/tools/ports/harfbuzz.py +++ b/tools/ports/harfbuzz.py @@ -152,4 +152,4 @@ def process_args(ports): def show(): - return 'harfbuzz (USE_HARFBUZZ=1; MIT license)' + return 'harfbuzz (-sUSE_HARFBUZZ=1 or --use-port=harfbuzz; MIT license)' diff --git a/tools/ports/icu.py b/tools/ports/icu.py index 9dfef378090db..e2c01d3e0f200 100644 --- a/tools/ports/icu.py +++ b/tools/ports/icu.py @@ -100,4 +100,4 @@ def clear(ports, settings, shared): def show(): - return 'icu (USE_ICU=1; Unicode License)' + return 'icu (-sUSE_ICU=1 or --use-port=icu; Unicode License)' diff --git a/tools/ports/libjpeg.py b/tools/ports/libjpeg.py index 291716a932362..e99776c789300 100644 --- a/tools/ports/libjpeg.py +++ b/tools/ports/libjpeg.py @@ -38,7 +38,7 @@ def clear(ports, settings, shared): def show(): - return 'libjpeg (USE_LIBJPEG=1; BSD license)' + return 'libjpeg (-sUSE_LIBJPEG=1 or --use-port=libjpeg; BSD license)' jconfig_h = '''/* jconfig.h. Generated from jconfig.cfg by configure. */ diff --git a/tools/ports/libmodplug.py b/tools/ports/libmodplug.py index e1e67954fc8b9..e6c1dc3f128e5 100644 --- a/tools/ports/libmodplug.py +++ b/tools/ports/libmodplug.py @@ -88,7 +88,7 @@ def clear(ports, settings, shared): def show(): - return 'libmodplug (USE_MODPLUG=1; public domain)' + return 'libmodplug (-sUSE_MODPLUG=1 or --use-port=libmodplug; public domain)' config_h = '''/* src/config.h. Generated from config.h.in by configure. */ diff --git a/tools/ports/libpng.py b/tools/ports/libpng.py index 24ac177d029e6..1342f81a0fb54 100644 --- a/tools/ports/libpng.py +++ b/tools/ports/libpng.py @@ -58,7 +58,7 @@ def process_dependencies(settings): def show(): - return 'libpng (-sUSE_LIBPNG; zlib license)' + return 'libpng (-sUSE_LIBPNG or --use-port=libpng; zlib license)' pnglibconf_h = r'''/* pnglibconf.h - library build configuration */ diff --git a/tools/ports/mpg123.py b/tools/ports/mpg123.py index b641b91969c12..50840ec087078 100644 --- a/tools/ports/mpg123.py +++ b/tools/ports/mpg123.py @@ -81,7 +81,7 @@ def clear(ports, settings, shared): def show(): - return 'mpg123 (USE_MPG123=1; zlib license)' + return 'mpg123 (-sUSE_MPG123=1 or --use-port=mpg123; zlib license)' config_h = r'''/* src/config.h. Generated from config.h.in by configure. */ diff --git a/tools/ports/ogg.py b/tools/ports/ogg.py index 9eff54d289d81..f56421bc9ceff 100644 --- a/tools/ports/ogg.py +++ b/tools/ports/ogg.py @@ -30,7 +30,7 @@ def clear(ports, settings, shared): def show(): - return 'ogg (USE_OGG=1; zlib license)' + return 'ogg (-sUSE_OGG=1 or --use-port=ogg; zlib license)' config_types_h = '''\ diff --git a/tools/ports/regal.py b/tools/ports/regal.py index e699c4e72a94b..7e04da2512818 100644 --- a/tools/ports/regal.py +++ b/tools/ports/regal.py @@ -126,4 +126,4 @@ def linker_setup(ports, settings): def show(): - return 'regal (USE_REGAL=1; Regal license)' + return 'regal (-sUSE_REGAL=1 or --use-port=regal; Regal license)' diff --git a/tools/ports/sdl2.py b/tools/ports/sdl2.py index 3378084372e64..5dd039b139ff2 100644 --- a/tools/ports/sdl2.py +++ b/tools/ports/sdl2.py @@ -91,4 +91,4 @@ def process_args(ports): def show(): - return 'SDL2 (USE_SDL=2; zlib license)' + return 'sdl2 (-sUSE_SDL=2 or --use-port=sdl2; zlib license)' diff --git a/tools/ports/sdl2_gfx.py b/tools/ports/sdl2_gfx.py index 74b5aad3d4e25..158ef0026c365 100644 --- a/tools/ports/sdl2_gfx.py +++ b/tools/ports/sdl2_gfx.py @@ -37,4 +37,4 @@ def process_dependencies(settings): def show(): - return 'SDL2_gfx (zlib license)' + return 'sdl2_gfx (-sUSE_SDL_GFX=2 or --use-port=sdl2_gfx; zlib license)' diff --git a/tools/ports/sdl2_image.py b/tools/ports/sdl2_image.py index 90fb2834094d1..f6029de06ad67 100644 --- a/tools/ports/sdl2_image.py +++ b/tools/ports/sdl2_image.py @@ -73,4 +73,4 @@ def process_dependencies(settings): def show(): - return 'SDL2_image (USE_SDL_IMAGE=2; zlib license)' + return 'sdl2_image (-sUSE_SDL_IMAGE=2 or --use-port=sdl2_image; zlib license)' diff --git a/tools/ports/sdl2_mixer.py b/tools/ports/sdl2_mixer.py index b759c3b43a2a2..5906078ecf57a 100644 --- a/tools/ports/sdl2_mixer.py +++ b/tools/ports/sdl2_mixer.py @@ -115,4 +115,4 @@ def process_dependencies(settings): def show(): - return 'SDL2_mixer (USE_SDL_MIXER=2; zlib license)' + return 'sdl2_mixer (-sUSE_SDL_MIXER=2 or --use-port=sdl2_mixer; zlib license)' diff --git a/tools/ports/sdl2_net.py b/tools/ports/sdl2_net.py index ec62e1a2e55cd..28b7f48ad1b84 100644 --- a/tools/ports/sdl2_net.py +++ b/tools/ports/sdl2_net.py @@ -38,4 +38,4 @@ def process_dependencies(settings): def show(): - return 'SDL2_net (zlib license)' + return 'sdl2_net (-sUSE_SDL_NET=2 or --use-port=sdl2_net; zlib license)' diff --git a/tools/ports/sdl2_ttf.py b/tools/ports/sdl2_ttf.py index db7674ff3f2c6..5c106e9acfb56 100644 --- a/tools/ports/sdl2_ttf.py +++ b/tools/ports/sdl2_ttf.py @@ -42,4 +42,4 @@ def process_args(ports): def show(): - return 'SDL2_ttf (-sUSE_SDL_TTF=2; zlib license)' + return 'sdl2_ttf (-sUSE_SDL_TTF=2 or --use-port=sdl2_ttf; zlib license)' diff --git a/tools/ports/sqlite3.py b/tools/ports/sqlite3.py index 8bc49dbe2861d..efd01f319cd4c 100644 --- a/tools/ports/sqlite3.py +++ b/tools/ports/sqlite3.py @@ -78,4 +78,4 @@ def clear(ports, settings, shared): def show(): - return 'sqlite (USE_SQLITE3=1); public domain)' + return 'sqlite3 (-sUSE_SQLITE3=1 or --use-port=sqlite3); public domain)' diff --git a/tools/ports/vorbis.py b/tools/ports/vorbis.py index 0f95756c1394e..92f5b4a356fb2 100644 --- a/tools/ports/vorbis.py +++ b/tools/ports/vorbis.py @@ -37,4 +37,4 @@ def process_dependencies(settings): def show(): - return 'vorbis (-sUSE_VORBIS; zlib license)' + return 'vorbis (-sUSE_VORBIS or --use-port=vorbis; zlib license)' diff --git a/tools/ports/zlib.py b/tools/ports/zlib.py index d78fb7e0fb62e..4d73d023e1673 100644 --- a/tools/ports/zlib.py +++ b/tools/ports/zlib.py @@ -34,7 +34,7 @@ def clear(ports, settings, shared): def show(): - return 'zlib (USE_ZLIB=1; zlib license)' + return 'zlib (-sUSE_ZLIB=1 or --use-port=zlib; zlib license)' zconf_h = r'''/* zconf.h -- configuration of the zlib compression library