mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
misc/raspberrypi-userland: fix build
- patch out -Werror - add <libgen.h> for basename in raspicam and patch for const correctness PR: 264940
This commit is contained in:
parent
5dc5b894d3
commit
e48f39f4e9
19 changed files with 259 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= raspberrypi-userland
|
||||
PORTVERSION= 20161026
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= misc
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- host_applications/android/apps/vidtex/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/android/apps/vidtex/CMakeLists.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
-SET(COMPILE_DEFINITIONS -Werror -Wall)
|
||||
+SET(COMPILE_DEFINITIONS -Wall)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include)
|
||||
|
||||
set (VIDTEX_SOURCES
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/apps/dtmerge/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/dtmerge/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@ get_filename_component (VIDEOCORE_ROOT ../../../.. ABS
|
||||
include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake)
|
||||
|
||||
if (NOT WIN32)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall)
|
||||
endif ()
|
||||
|
||||
include_directories (
|
|
@ -1,6 +1,15 @@
|
|||
--- host_applications/linux/apps/dtoverlay/CMakeLists.txt.orig 2016-10-30 UTC
|
||||
--- host_applications/linux/apps/dtoverlay/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/dtoverlay/CMakeLists.txt
|
||||
@@ -22,12 +22,4 @@ add_custom_command(TARGET dtoverlay POST
|
||||
@@ -4,7 +4,7 @@ get_filename_component (VIDEOCORE_ROOT ../../../.. ABS
|
||||
include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake)
|
||||
|
||||
if (NOT WIN32)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall)
|
||||
endif ()
|
||||
|
||||
include_directories (
|
||||
@@ -22,12 +22,4 @@ add_custom_command(TARGET dtoverlay POST_BUILD COMMAND
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin)
|
||||
|
||||
set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/apps/gencmd/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/gencmd/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@ if (WIN32)
|
||||
set(VCOS_PLATFORM win32)
|
||||
else ()
|
||||
set(VCOS_PLATFORM pthreads)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall)
|
||||
endif ()
|
||||
|
||||
include_directories( ../../../..
|
|
@ -1,8 +1,8 @@
|
|||
--- host_applications/linux/apps/hello_pi/Makefile.include.orig 2015-03-10 14:32:31 UTC
|
||||
--- host_applications/linux/apps/hello_pi/Makefile.include.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/hello_pi/Makefile.include
|
||||
@@ -3,7 +3,7 @@ CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_M
|
||||
@@ -3,7 +3,7 @@ CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC
|
||||
|
||||
LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L../libs/ilclient -L../libs/vgfont
|
||||
LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont
|
||||
|
||||
-INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont
|
||||
+INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont -ILOCALBASE/include/freetype2
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/apps/raspicam/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/raspicam/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# raspistill/raspivid/raspiyuv
|
||||
|
||||
-SET(COMPILE_DEFINITIONS -Werror)
|
||||
+SET(COMPILE_DEFINITIONS)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/apps/raspicam/)
|
|
@ -0,0 +1,31 @@
|
|||
--- host_applications/linux/apps/raspicam/RaspiStill.c.orig 2022-06-28 11:46:30 UTC
|
||||
+++ host_applications/linux/apps/raspicam/RaspiStill.c
|
||||
@@ -46,9 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
|
||||
* We use the RaspiCamControl code to handle the specific camera settings.
|
||||
*/
|
||||
|
||||
-// We use some GNU extensions (asprintf, basename)
|
||||
-#define _GNU_SOURCE
|
||||
-
|
||||
+#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -445,7 +443,7 @@ static void dump_status(RASPISTILL_STATE *state)
|
||||
* @param state Pointer to state structure to assign any discovered parameters to
|
||||
* @return non-0 if failed for some reason, 0 otherwise
|
||||
*/
|
||||
-static int parse_cmdline(int argc, const char **argv, RASPISTILL_STATE *state)
|
||||
+static int parse_cmdline(int argc, char **argv, RASPISTILL_STATE *state)
|
||||
{
|
||||
// Parse the command line arguments.
|
||||
// We are looking for --<something> or -<abbreviation of something>
|
||||
@@ -1756,7 +1754,7 @@ static void rename_file(RASPISTILL_STATE *state, FILE
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
-int main(int argc, const char **argv)
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
// Our main data storage vessel..
|
||||
RASPISTILL_STATE state;
|
|
@ -0,0 +1,31 @@
|
|||
--- host_applications/linux/apps/raspicam/RaspiStillYUV.c.orig 2022-06-28 11:40:06 UTC
|
||||
+++ host_applications/linux/apps/raspicam/RaspiStillYUV.c
|
||||
@@ -46,9 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
|
||||
* We use the RaspiPreview code to handle the generic preview
|
||||
*/
|
||||
|
||||
-// We use some GNU extensions (basename)
|
||||
-#define _GNU_SOURCE
|
||||
-
|
||||
+#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -287,7 +285,7 @@ static void dump_status(RASPISTILLYUV_STATE *state)
|
||||
* @param state Pointer to state structure to assign any discovered parameters to
|
||||
* @return non-0 if failed for some reason, 0 otherwise
|
||||
*/
|
||||
-static int parse_cmdline(int argc, const char **argv, RASPISTILLYUV_STATE *state)
|
||||
+static int parse_cmdline(int argc, char **argv, RASPISTILLYUV_STATE *state)
|
||||
{
|
||||
// Parse the command line arguments.
|
||||
// We are looking for --<something> or -<abbreviation of something>
|
||||
@@ -1186,7 +1184,7 @@ static void rename_file(RASPISTILLYUV_STATE *state, FI
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
-int main(int argc, const char **argv)
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
// Our main data storage vessel..
|
||||
RASPISTILLYUV_STATE state;
|
|
@ -0,0 +1,31 @@
|
|||
--- host_applications/linux/apps/raspicam/RaspiVid.c.orig 2022-06-28 11:41:40 UTC
|
||||
+++ host_applications/linux/apps/raspicam/RaspiVid.c
|
||||
@@ -47,9 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
|
||||
* We use the RaspiPreview code to handle the (generic) preview window
|
||||
*/
|
||||
|
||||
-// We use some GNU extensions (basename)
|
||||
-#define _GNU_SOURCE
|
||||
-
|
||||
+#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -449,7 +447,7 @@ static void dump_status(RASPIVID_STATE *state)
|
||||
* @param state Pointer to state structure to assign any discovered parameters to
|
||||
* @return Non-0 if failed for some reason, 0 otherwise
|
||||
*/
|
||||
-static int parse_cmdline(int argc, const char **argv, RASPIVID_STATE *state)
|
||||
+static int parse_cmdline(int argc, char **argv, RASPIVID_STATE *state)
|
||||
{
|
||||
// Parse the command line arguments.
|
||||
// We are looking for --<something> or -<abbreviation of something>
|
||||
@@ -2034,7 +2032,7 @@ static int wait_for_next_change(RASPIVID_STATE *state)
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
-int main(int argc, const char **argv)
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
// Our main data storage vessel..
|
||||
RASPIVID_STATE state;
|
|
@ -0,0 +1,31 @@
|
|||
--- host_applications/linux/apps/raspicam/RaspiVidYUV.c.orig 2022-06-28 11:42:24 UTC
|
||||
+++ host_applications/linux/apps/raspicam/RaspiVidYUV.c
|
||||
@@ -49,9 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
|
||||
* We use the RaspiPreview code to handle the generic preview
|
||||
*/
|
||||
|
||||
-// We use some GNU extensions (basename)
|
||||
-#define _GNU_SOURCE
|
||||
-
|
||||
+#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -325,7 +323,7 @@ static void dump_status(RASPIVIDYUV_STATE *state)
|
||||
* @param state Pointer to state structure to assign any discovered parameters to
|
||||
* @return Non-0 if failed for some reason, 0 otherwise
|
||||
*/
|
||||
-static int parse_cmdline(int argc, const char **argv, RASPIVIDYUV_STATE *state)
|
||||
+static int parse_cmdline(int argc, char **argv, RASPIVIDYUV_STATE *state)
|
||||
{
|
||||
// Parse the command line arguments.
|
||||
// We are looking for --<something> or -<abbreviation of something>
|
||||
@@ -1210,7 +1208,7 @@ static int wait_for_next_change(RASPIVIDYUV_STATE *sta
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
-int main(int argc, const char **argv)
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
// Our main data storage vessel..
|
||||
RASPIVIDYUV_STATE state;
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/apps/smem/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/apps/smem/CMakeLists.txt
|
||||
@@ -4,7 +4,7 @@ get_filename_component (VIDEOCORE_ROOT ../../../.. ABS
|
||||
include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake)
|
||||
|
||||
if (NOT WIN32)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall)
|
||||
endif ()
|
||||
|
||||
include_directories (
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/libs/bcm_host/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/libs/bcm_host/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ if (WIN32)
|
||||
set(VCOS_PLATFORM win32)
|
||||
else ()
|
||||
set(VCOS_PLATFORM pthreads)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall)
|
||||
endif ()
|
||||
|
||||
include_directories( ../../../..
|
|
@ -0,0 +1,11 @@
|
|||
--- host_applications/linux/libs/sm/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ host_applications/linux/libs/sm/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ if (WIN32)
|
||||
set(VCOS_PLATFORM win32)
|
||||
else ()
|
||||
set(VCOS_PLATFORM pthreads)
|
||||
- add_definitions(-Wall -Werror -Wno-error=parentheses-equality -Wno-error=enum-conversion)
|
||||
+ add_definitions(-Wall -Wno-error=parentheses-equality -Wno-error=enum-conversion)
|
||||
endif ()
|
||||
|
||||
include_directories( ../../../..
|
|
@ -0,0 +1,11 @@
|
|||
--- interface/mmal/CMakeLists.txt.orig 2022-06-28 04:33:47 UTC
|
||||
+++ interface/mmal/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE)
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
endif (NOT DEFINED LIBRARY_TYPE)
|
||||
|
||||
-add_definitions(-Wall -Werror -Wno-error=enum-conversion)
|
||||
+add_definitions(-Wall)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
message(STATUS "${CMAKE_CXX_COMPILER_VERSION}")
|
|
@ -0,0 +1,11 @@
|
|||
--- interface/vcos/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ interface/vcos/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ foreach (header ${HEADERS})
|
||||
endforeach ()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
- add_definitions (-ggdb -Werror -Wall)
|
||||
+ add_definitions (-ggdb -Wall)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_COMPILER_2005)
|
|
@ -0,0 +1,11 @@
|
|||
--- interface/vcos/pthreads/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ interface/vcos/pthreads/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
# MSVC5 does not fully support C99, enabling declaration-after-statement
|
||||
# warnings allows a common MSVC5 build error to be detected in Linux builds.
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wdeclaration-after-statement")
|
||||
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wdeclaration-after-statement")
|
||||
add_definitions (-D_GNU_SOURCE)
|
||||
endif ()
|
||||
|
|
@ -1,8 +1,15 @@
|
|||
Don't install Linux specific init script.
|
||||
|
||||
--- interface/vmcs_host/linux/vcfiled/CMakeLists.txt.orig 2015-02-13 18:39:19 UTC
|
||||
--- interface/vmcs_host/linux/vcfiled/CMakeLists.txt.orig 2016-10-24 19:59:54 UTC
|
||||
+++ interface/vmcs_host/linux/vcfiled/CMakeLists.txt
|
||||
@@ -20,8 +20,8 @@ install(TARGETS vcfiled
|
||||
@@ -1,6 +1,3 @@
|
||||
-
|
||||
-add_definitions(-Werror)
|
||||
-
|
||||
# vcfiled - serves files to videocore. used for media handlers from
|
||||
# OpenMAX/IL and loading VLLs.
|
||||
add_executable(vcfiled vcfiled.c)
|
||||
@@ -20,8 +17,8 @@ install(TARGETS vcfiled
|
||||
configure_file (etc/init.d/vcfiled ${PROJECT_BINARY_DIR}/etc/init.d/vcfiled)
|
||||
|
||||
# script to start up vcfiled at start of day
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- makefiles/cmake/vmcs.cmake.orig 2015-01-05 16:36:28 UTC
|
||||
--- makefiles/cmake/vmcs.cmake.orig 2016-10-24 19:59:54 UTC
|
||||
+++ makefiles/cmake/vmcs.cmake
|
||||
@@ -55,10 +55,6 @@
|
||||
@@ -57,10 +57,6 @@ configure_file (
|
||||
# DESTINATION ${VMCS_INSTALL_PREFIX}/sbin
|
||||
# PERMISSIONS OWNER_WRITE WORLD_READ)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue