OCaml 4.14.0 rebuild
[arch-packages.git] / java17-openjfx / trunk / java-openjfx-flags.patch
blob089f87305467cba496d8f598e85157b78181074f
1 diff -aur orig/buildSrc/linux.gradle patched/buildSrc/linux.gradle
2 --- orig/buildSrc/linux.gradle 2022-07-12 13:56:53.000000000 +0200
3 +++ patched/buildSrc/linux.gradle 2022-07-20 15:58:16.621288214 +0200
4 @@ -43,8 +43,11 @@
5 def commonFlags = [
6 "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
7 "-fstack-protector",
8 + "-Wno-error=cast-function-type",
9 "-Wextra", "-Wall", "-Wformat-security", "-Wno-unused", "-Wno-parentheses", "-Werror=trampolines"] // warning flags
11 +commonFlags.addAll(System.getenv("CFLAGS").trim().replaceAll(" +", " ").split(" "))
13 if (!IS_64) {
14 commonFlags += "-m32"
16 @@ -70,6 +73,7 @@
17 def staticLinkFlags = [].flatten()
19 def linkFlags = IS_STATIC_BUILD ? staticLinkFlags : dynamicLinkFlags;
20 +linkFlags.addAll(System.getenv("LDFLAGS").trim().split(" "))
22 if (IS_DEBUG_NATIVE) {
23 linkFlags += "-g"
24 @@ -284,7 +288,7 @@
25 LINUX.iio.compiler = compiler
26 LINUX.iio.ccFlags = [cFlags, "-fvisibility=hidden"].flatten()
27 LINUX.iio.linker = IS_STATIC_BUILD ? "ld" : linker
28 -LINUX.iio.linkFlags = [linkFlags].flatten()
29 +LINUX.iio.linkFlags = [linkFlags, "-ljpeg"].flatten()
30 LINUX.iio.lib = "javafx_iio"
32 LINUX.prismES2 = [:]
33 @@ -332,5 +336,5 @@
34 LINUX.webkit = [:]
35 LINUX.webkit.compiler = compiler
36 LINUX.webkit.linker = linker
37 -LINUX.webkit.ccFlags = commonFlags.flatten()
38 +LINUX.webkit.ccFlags = [commonFlags, "-fno-lto"].flatten()
39 LINUX.webkit.linkFlags = linkFlags.flatten()
40 Only in patched/buildSrc: linux.gradle.orig
41 diff -aur orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile
42 --- orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile 2022-07-12 13:56:53.000000000 +0200
43 +++ patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin/Makefile 2022-07-20 15:58:16.621288214 +0200
44 @@ -17,7 +17,7 @@
45 OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/avplugin
46 endif
48 -CFLAGS = -fPIC \
49 +CFLAGS := -fPIC \
50 -Wformat \
51 -Wextra \
52 -Wformat-security \
53 @@ -31,17 +31,13 @@
54 -DGSTREAMER_LITE \
55 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 \
56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 \
57 - -ffunction-sections -fdata-sections
58 + -ffunction-sections -fdata-sections \
59 + ${CFLAGS}
61 ifneq ($(ARCH), aarch64)
62 CFLAGS += -msse2
63 endif
65 -ifeq ($(BUILD_TYPE), Release)
66 - CFLAGS += -Os
67 -else
68 - CFLAGS += -g -Wall
69 -endif
71 PACKAGES_INCLUDES := $(shell pkg-config --cflags glib-2.0)
72 PACKAGES_LIBS := $(shell pkg-config --libs glib-2.0 gobject-2.0)
73 @@ -52,11 +48,12 @@
74 -I../../../gstreamer-lite/gstreamer/libs \
75 $(PACKAGES_INCLUDES)
77 -LDFLAGS = -L$(BUILD_DIR) \
78 +LDFLAGS := -L$(BUILD_DIR) \
79 -lgstreamer-lite \
80 $(PACKAGES_LIBS) \
81 -z relro \
82 - -static-libgcc -static-libstdc++ -Wl,--gc-sections
83 + -static-libgcc -static-libstdc++ -Wl,--gc-sections \
84 + ${LDFLAGS}
86 ifneq ($(strip $(LIBAV_DIR)),)
87 INCLUDES += -I$(LIBAV_DIR)/include
88 Only in patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/avplugin: Makefile.orig
89 diff -aur orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile
90 --- orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile 2022-07-12 13:56:53.000000000 +0200
91 +++ patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile 2022-07-20 15:58:16.621288214 +0200
92 @@ -14,7 +14,7 @@
94 TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so
96 -CFLAGS = -fPIC \
97 +CFLAGS := -fPIC \
98 -Wformat \
99 -Wextra \
100 -Wformat-security \
101 @@ -33,18 +33,13 @@
102 -DGSTREAMER_LITE \
103 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 \
104 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 \
105 - -ffunction-sections -fdata-sections
106 + -ffunction-sections -fdata-sections \
107 + ${CFLAGS}
109 ifneq ($(ARCH), aarch64)
110 CFLAGS += -msse2
111 endif
113 -ifeq ($(BUILD_TYPE), Release)
114 - CFLAGS += -Os
115 -else
116 - CFLAGS += -g -Wall
117 -endif
120 INCLUDES = -I$(SRCBASE_DIR) \
121 $(addprefix -I$(SRCBASE_DIR)/,$(DIRLIST)) \
122 @@ -54,9 +49,10 @@
123 PACKAGES_INCLUDES := $(shell pkg-config --cflags glib-2.0)
124 PACKAGES_LIBS := $(shell pkg-config --libs glib-2.0 gobject-2.0)
126 -LDFLAGS = -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \
127 +LDFLAGS := -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \
128 -z relro \
129 - -static-libgcc -static-libstdc++ -Wl,--gc-sections
130 + -static-libgcc -static-libstdc++ -Wl,--gc-sections \
131 + ${LDFLAGS}
133 ifeq ($(ARCH), x32)
134 CFLAGS += -m32
135 Only in patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins: Makefile.orig
136 diff -aur orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile
137 --- orig/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile 2022-07-12 13:56:53.000000000 +0200
138 +++ patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite/Makefile 2022-07-20 15:58:16.624621629 +0200
139 @@ -37,7 +37,7 @@
141 TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so
143 -CFLAGS =-fPIC \
144 +CFLAGS :=-fPIC \
145 -Wformat \
146 -Wextra \
147 -Wformat-security \
148 @@ -55,13 +55,8 @@
149 -DGST_DISABLE_LOADSAVE \
150 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 \
151 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 \
152 - -ffunction-sections -fdata-sections
154 -ifeq ($(BUILD_TYPE), Release)
155 - CFLAGS += -Os
156 -else
157 - CFLAGS += -g -Wall
158 -endif
159 + -ffunction-sections -fdata-sections \
160 + ${CFLAGS}
162 INCLUDES = -I$(BASE_DIR)/plugins \
163 -I$(SRCBASE_DIR)/projects/build/linux/common \
164 @@ -79,9 +74,10 @@
165 PACKAGES_INCLUDES := $(shell pkg-config --cflags alsa glib-2.0)
166 PACKAGES_LIBS := $(shell pkg-config --libs alsa glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0)
168 -LDFLAGS = -L$(BUILD_DIR) -lm $(PACKAGES_LIBS) \
169 +LDFLAGS := -L$(BUILD_DIR) -lm $(PACKAGES_LIBS) \
170 -z relro \
171 - -static-libgcc -static-libstdc++ -Wl,--gc-sections
172 + -static-libgcc -static-libstdc++ -Wl,--gc-sections \
173 + ${LDFLAGS}
175 ifeq ($(ARCH), x32)
176 CFLAGS += -m32
177 Only in patched/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite: Makefile.orig
178 diff -aur orig/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile patched/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile
179 --- orig/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile 2022-07-12 13:56:53.000000000 +0200
180 +++ patched/modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile 2022-07-20 15:59:21.892883201 +0200
181 @@ -42,7 +42,7 @@
183 TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so
185 -CFLAGS = -DTARGET_OS_LINUX=1 \
186 +CFLAGS := -DTARGET_OS_LINUX=1 \
187 -D_GNU_SOURCE \
188 -DGST_REMOVE_DEPRECATED \
189 -DGST_DISABLE_GST_DEBUG \
190 @@ -54,7 +54,8 @@
191 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 \
192 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 \
193 -Werror=deprecated-declarations \
194 - -ffunction-sections -fdata-sections
195 + -ffunction-sections -fdata-sections \
196 + ${CFLAGS}
198 CPPFLAGS = -fno-rtti -ffunction-sections -fdata-sections
200 @@ -87,21 +88,16 @@
201 -I$(GSTREAMER_LITE_DIR)/gstreamer/libs \
202 $(PACKAGES_INCLUDES)
204 - LDFLAGS = -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \
205 + LDFLAGS := -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) \
206 -z relro \
207 - -static-libgcc -static-libstdc++ -Wl,--gc-sections
208 + -static-libgcc -static-libstdc++ -Wl,--gc-sections \
209 + ${LDFLAGS}
210 else
211 CFLAGS += $(EXTRA_CFLAGS)
212 INCLUDES = $(BASE_INCLUDES)
213 LDFLAGS = -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) $(EXTRA_LDFLAGS)
214 endif
216 -ifeq ($(BUILD_TYPE), Release)
217 - CFLAGS += -Os
218 -else
219 - CFLAGS += -g -Wall -D_DEBUG
220 -endif
222 ifeq ($(ARCH), x32)
223 CFLAGS += -m32
224 LDFLAGS += -m32