From 8f34054fc5d32d7c9873b17164cc77a0eea6ee81 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Wed, 7 Feb 2024 01:17:54 -0500 Subject: [PATCH 1/3] Fix problem with new FreeType dependency in 2.13.2 ppc-harfbuzz is now required. --- README.md | 4 ++-- examples/3D_CubedTileDemo/Makefile | 2 +- examples/3D_Light1/Makefile | 2 +- examples/3D_Light2/Makefile | 2 +- examples/3D_Light3/Makefile | 2 +- examples/3D_Light4/Makefile | 2 +- examples/3D_sample1/Makefile | 2 +- examples/3D_sample2/Makefile | 2 +- examples/3D_sample3/Makefile | 2 +- examples/3D_sample4/Makefile | 2 +- examples/3D_sample5/Makefile | 2 +- examples/NEED_GRRLIB_FUNCTION/Makefile | 2 +- examples/TileDemo/Makefile | 2 +- examples/basic_drawing/Makefile | 2 +- examples/bitmap_fx/Makefile | 2 +- examples/blending/Makefile | 2 +- examples/compositing/Makefile | 2 +- examples/funsin/Makefile | 2 +- examples/gamecube/3D_CubedTileDemo/Makefile | 2 +- examples/gamecube/3D_Light1/Makefile | 2 +- examples/gamecube/3D_Light2/Makefile | 2 +- examples/gamecube/3D_Light3/Makefile | 2 +- examples/gamecube/3D_Light4/Makefile | 2 +- examples/gamecube/3D_sample1/Makefile | 2 +- examples/gamecube/3D_sample2/Makefile | 2 +- examples/gamecube/3D_sample3/Makefile | 2 +- examples/gamecube/3D_sample4/Makefile | 2 +- examples/gamecube/3D_sample5/Makefile | 2 +- examples/gamecube/TileDemo/Makefile | 2 +- examples/gamecube/basic_drawing/Makefile | 2 +- examples/gamecube/bitmap_fx/Makefile | 2 +- examples/gamecube/compositing/Makefile | 2 +- examples/gamecube/funsin/Makefile | 2 +- examples/gamecube/template/Makefile | 2 +- examples/gamecube/ttf/Makefile | 2 +- examples/gamecube/unlimited2d/Makefile | 2 +- examples/gamecube/unlimited3d/Makefile | 2 +- examples/particle/Makefile | 2 +- examples/template/Makefile | 2 +- examples/ttf/Makefile | 2 +- examples/unlimited2d/Makefile | 2 +- examples/unlimited3d/Makefile | 2 +- 42 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index bb2cf50..9206b79 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ at the top of your .c/.cpp file and use the functions as required You will need to add ```make --lgrrlib -lfreetype -lbz2 -lfat -ljpeg -lpngu -lpng -lz +-lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat ``` to the libs line in your makefile @@ -189,7 +189,7 @@ so lbz2 needs to be added after lfreetype in your makefile. For example: ```make -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat ``` Since GRRLIB and libpngu are now installed into the porlibs folder, make sure you don't have any leftovers from previous installations. diff --git a/examples/3D_CubedTileDemo/Makefile b/examples/3D_CubedTileDemo/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_CubedTileDemo/Makefile +++ b/examples/3D_CubedTileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light1/Makefile b/examples/3D_Light1/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light1/Makefile +++ b/examples/3D_Light1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light2/Makefile b/examples/3D_Light2/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light2/Makefile +++ b/examples/3D_Light2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light3/Makefile b/examples/3D_Light3/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light3/Makefile +++ b/examples/3D_Light3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light4/Makefile b/examples/3D_Light4/Makefile index 843b158..c62800a 100644 --- a/examples/3D_Light4/Makefile +++ b/examples/3D_Light4/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm diff --git a/examples/3D_sample1/Makefile b/examples/3D_sample1/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample1/Makefile +++ b/examples/3D_sample1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample2/Makefile b/examples/3D_sample2/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample2/Makefile +++ b/examples/3D_sample2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample3/Makefile b/examples/3D_sample3/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample3/Makefile +++ b/examples/3D_sample3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample4/Makefile b/examples/3D_sample4/Makefile index c6517d1..26ad04d 100644 --- a/examples/3D_sample4/Makefile +++ b/examples/3D_sample4/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample5/Makefile b/examples/3D_sample5/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample5/Makefile +++ b/examples/3D_sample5/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/NEED_GRRLIB_FUNCTION/Makefile b/examples/NEED_GRRLIB_FUNCTION/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/NEED_GRRLIB_FUNCTION/Makefile +++ b/examples/NEED_GRRLIB_FUNCTION/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/TileDemo/Makefile b/examples/TileDemo/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/TileDemo/Makefile +++ b/examples/TileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/basic_drawing/Makefile b/examples/basic_drawing/Makefile index 33f88fb..90b5b97 100644 --- a/examples/basic_drawing/Makefile +++ b/examples/basic_drawing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/bitmap_fx/Makefile b/examples/bitmap_fx/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/bitmap_fx/Makefile +++ b/examples/bitmap_fx/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/blending/Makefile b/examples/blending/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/blending/Makefile +++ b/examples/blending/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/compositing/Makefile b/examples/compositing/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/compositing/Makefile +++ b/examples/compositing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/funsin/Makefile b/examples/funsin/Makefile index de822b1..661aced 100644 --- a/examples/funsin/Makefile +++ b/examples/funsin/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_CubedTileDemo/Makefile b/examples/gamecube/3D_CubedTileDemo/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_CubedTileDemo/Makefile +++ b/examples/gamecube/3D_CubedTileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light1/Makefile b/examples/gamecube/3D_Light1/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light1/Makefile +++ b/examples/gamecube/3D_Light1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light2/Makefile b/examples/gamecube/3D_Light2/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light2/Makefile +++ b/examples/gamecube/3D_Light2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light3/Makefile b/examples/gamecube/3D_Light3/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light3/Makefile +++ b/examples/gamecube/3D_Light3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light4/Makefile b/examples/gamecube/3D_Light4/Makefile index 26d41a9..eb145d8 100644 --- a/examples/gamecube/3D_Light4/Makefile +++ b/examples/gamecube/3D_Light4/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/3D_sample1/Makefile b/examples/gamecube/3D_sample1/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample1/Makefile +++ b/examples/gamecube/3D_sample1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample2/Makefile b/examples/gamecube/3D_sample2/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample2/Makefile +++ b/examples/gamecube/3D_sample2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample3/Makefile b/examples/gamecube/3D_sample3/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample3/Makefile +++ b/examples/gamecube/3D_sample3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample4/Makefile b/examples/gamecube/3D_sample4/Makefile index 91187dc..bd664cd 100644 --- a/examples/gamecube/3D_sample4/Makefile +++ b/examples/gamecube/3D_sample4/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample5/Makefile b/examples/gamecube/3D_sample5/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample5/Makefile +++ b/examples/gamecube/3D_sample5/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/TileDemo/Makefile b/examples/gamecube/TileDemo/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/TileDemo/Makefile +++ b/examples/gamecube/TileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/basic_drawing/Makefile b/examples/gamecube/basic_drawing/Makefile index 81d2a35..14197c5 100644 --- a/examples/gamecube/basic_drawing/Makefile +++ b/examples/gamecube/basic_drawing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/bitmap_fx/Makefile b/examples/gamecube/bitmap_fx/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/bitmap_fx/Makefile +++ b/examples/gamecube/bitmap_fx/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/compositing/Makefile b/examples/gamecube/compositing/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/compositing/Makefile +++ b/examples/gamecube/compositing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/funsin/Makefile b/examples/gamecube/funsin/Makefile index 096d10c..826a13d 100644 --- a/examples/gamecube/funsin/Makefile +++ b/examples/gamecube/funsin/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/template/Makefile b/examples/gamecube/template/Makefile index 26d41a9..eb145d8 100644 --- a/examples/gamecube/template/Makefile +++ b/examples/gamecube/template/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/ttf/Makefile b/examples/gamecube/ttf/Makefile index d6bbcd5..fb5d395 100644 --- a/examples/gamecube/ttf/Makefile +++ b/examples/gamecube/ttf/Makefile @@ -35,7 +35,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # the order can-be/is critical #--------------------------------------------------------------------------------- LIBS := -lgrrlib -LIBS += -lfreetype -lbz2 +LIBS += `freetype-config --libs` LIBS += -lpngu -lpng -ljpeg -lz -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/unlimited2d/Makefile b/examples/gamecube/unlimited2d/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/unlimited2d/Makefile +++ b/examples/gamecube/unlimited2d/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/unlimited3d/Makefile b/examples/gamecube/unlimited3d/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/unlimited3d/Makefile +++ b/examples/gamecube/unlimited3d/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/particle/Makefile b/examples/particle/Makefile index f0a40ce..63c23c8 100644 --- a/examples/particle/Makefile +++ b/examples/particle/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/template/Makefile b/examples/template/Makefile index 843b158..c62800a 100644 --- a/examples/template/Makefile +++ b/examples/template/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm diff --git a/examples/ttf/Makefile b/examples/ttf/Makefile index d023477..e7c812d 100644 --- a/examples/ttf/Makefile +++ b/examples/ttf/Makefile @@ -35,7 +35,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # the order can-be/is critical #--------------------------------------------------------------------------------- LIBS := -lgrrlib -LIBS += -lfreetype -lbz2 +LIBS += `freetype-config --libs` LIBS += -lpngu -lpng -ljpeg -lz -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd diff --git a/examples/unlimited2d/Makefile b/examples/unlimited2d/Makefile index eacb378..8f4e170 100644 --- a/examples/unlimited2d/Makefile +++ b/examples/unlimited2d/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81 #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/unlimited3d/Makefile b/examples/unlimited3d/Makefile index eacb378..8f4e170 100644 --- a/examples/unlimited3d/Makefile +++ b/examples/unlimited3d/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81 #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing From f754f25c9748ece1c26787a2d8aae6d232923e05 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Wed, 7 Feb 2024 01:42:08 -0500 Subject: [PATCH 2/3] Update documentation --- CHANGELOG.md | 1 + GRRLIB/GRRLIB/grrlib.h | 2 +- README.md | 4 ++-- examples/particle/source/main.cpp | 10 ++-------- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f2e03..b713fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased][] - Fixed compatibility issues with devkitPPC release 39. +- Fixed linking problem in examples with FreeType 2.13.2. - Added `GRRLIB_LoadTTFFromFile()` to load a TTF from a file. - Added `GRRLIB_Ellipse()` to draw an ellipse. - Changed `GRRLIB_PrintfTTF()` and `GRRLIB_PrintfTTFW()` so they use the alpha channel from the `color` parameter. diff --git a/GRRLIB/GRRLIB/grrlib.h b/GRRLIB/GRRLIB/grrlib.h index de8c4d1..9fbcd0d 100644 --- a/GRRLIB/GRRLIB/grrlib.h +++ b/GRRLIB/GRRLIB/grrlib.h @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------------ -Copyright (c) 2009-2021 The GRRLIB Team +Copyright (c) 2009-2024 The GRRLIB Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9206b79..034fb13 100644 --- a/README.md +++ b/README.md @@ -183,8 +183,8 @@ Now it needs to be like this: LIBDIRS := $(PORTLIBS) ``` -The FreeType library is now compiled with a dependency on bzip2, -so lbz2 needs to be added after lfreetype in your makefile. +The FreeType library is now compiled with dependencies, +so freetype2 must be added to pkg-config in your makefile. For example: diff --git a/examples/particle/source/main.cpp b/examples/particle/source/main.cpp index e918d26..37318f0 100644 --- a/examples/particle/source/main.cpp +++ b/examples/particle/source/main.cpp @@ -7,6 +7,7 @@ ============================================*/ #include +#include #include #include #include @@ -280,12 +281,5 @@ static u8 CalculateFrameRate() { */ static constexpr u8 ClampVar8 (f32 Value) { Value = std::roundf(Value); - if (Value < 0) { - Value = 0; - } - else if (Value > 255) { - Value = 255; - } - - return static_cast(Value); + return static_cast(std::clamp(Value, 0.0f, 255.0f)); } From 187b8fbbae905ac5612f41002a2d17e2463ecd95 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Wed, 7 Feb 2024 19:42:17 -0500 Subject: [PATCH 3/3] Change Makefile from ttf examples --- CHANGELOG.md | 2 +- examples/gamecube/ttf/Makefile | 5 ++--- examples/ttf/Makefile | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b713fa0..3369548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased][] - Fixed compatibility issues with devkitPPC release 39. -- Fixed linking problem in examples with FreeType 2.13.2. +- Fixed linking problem in examples with FreeType 2.13.2 (pkgrel 1 and 2). - Added `GRRLIB_LoadTTFFromFile()` to load a TTF from a file. - Added `GRRLIB_Ellipse()` to draw an ellipse. - Changed `GRRLIB_PrintfTTF()` and `GRRLIB_PrintfTTFW()` so they use the alpha channel from the `color` parameter. diff --git a/examples/gamecube/ttf/Makefile b/examples/gamecube/ttf/Makefile index fb5d395..32a0e4e 100644 --- a/examples/gamecube/ttf/Makefile +++ b/examples/gamecube/ttf/Makefile @@ -34,9 +34,8 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -LIBS += `freetype-config --libs` -LIBS += -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu +LIBS += `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/ttf/Makefile b/examples/ttf/Makefile index e7c812d..d866d51 100644 --- a/examples/ttf/Makefile +++ b/examples/ttf/Makefile @@ -34,9 +34,8 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -LIBS += `freetype-config --libs` -LIBS += -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu +LIBS += `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm