From 841b99ba3b2b66931575a295b00761374472865c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 27 Nov 2017 17:26:36 +0100 Subject: [PATCH] libports: create SDL recipe Fixes #2602. --- repos/libports/lib/mk/sdl.mk | 8 + repos/libports/lib/symbols/sdl | 349 ++++++++++++++++++++++ repos/libports/recipes/api/sdl/content.mk | 27 ++ repos/libports/recipes/api/sdl/hash | 1 + repos/libports/recipes/src/sdl/README | 3 + repos/libports/recipes/src/sdl/api | 1 + repos/libports/recipes/src/sdl/content.mk | 18 ++ repos/libports/recipes/src/sdl/hash | 1 + repos/libports/recipes/src/sdl/used_apis | 9 + 9 files changed, 417 insertions(+) create mode 100644 repos/libports/lib/symbols/sdl create mode 100644 repos/libports/recipes/api/sdl/content.mk create mode 100644 repos/libports/recipes/api/sdl/hash create mode 100644 repos/libports/recipes/src/sdl/README create mode 100644 repos/libports/recipes/src/sdl/api create mode 100644 repos/libports/recipes/src/sdl/content.mk create mode 100644 repos/libports/recipes/src/sdl/hash create mode 100644 repos/libports/recipes/src/sdl/used_apis diff --git a/repos/libports/lib/mk/sdl.mk b/repos/libports/lib/mk/sdl.mk index e4458ebf2e..9f6d60c148 100644 --- a/repos/libports/lib/mk/sdl.mk +++ b/repos/libports/lib/mk/sdl.mk @@ -10,6 +10,14 @@ CC_WARN = INC_DIR += $(SDL_PORT_DIR)/include INC_DIR += $(SDL_PORT_DIR)/include/SDL +# +# In case we use the depot add the location +# to the global include path. +# +ifeq ($(CONTRIB),) +REP_INC_DIR += include/SDL +endif + # backends SRC_CC = video/SDL_genode_fb_video.cc \ video/SDL_genode_fb_events.cc \ diff --git a/repos/libports/lib/symbols/sdl b/repos/libports/lib/symbols/sdl new file mode 100644 index 0000000000..4c29286d78 --- /dev/null +++ b/repos/libports/lib/symbols/sdl @@ -0,0 +1,349 @@ +SDL_AddTimer T +SDL_AllocBlitMap T +SDL_AllocFormat T +SDL_AllocRW T +SDL_AppActiveInit T +SDL_AppActiveQuit T +SDL_ApplyGamma T +SDL_AudioDriverName T +SDL_AudioInit T +SDL_AudioQuit T +SDL_BuildAudioCVT T +SDL_CDClose T +SDL_CDEject T +SDL_CDName T +SDL_CDNumDrives T +SDL_CDOpen T +SDL_CDPause T +SDL_CDPlay T +SDL_CDPlayTracks T +SDL_CDROMInit T +SDL_CDROMQuit T +SDL_CDResume T +SDL_CDStatus T +SDL_CDStop T +SDL_CDcaps B 80 +SDL_CalculateAlphaBlit T +SDL_CalculateAudioSpec T +SDL_CalculateBlit T +SDL_CalculateBlit0 T +SDL_CalculateBlit1 T +SDL_CalculateBlitN T +SDL_CalculatePitch T +SDL_CheckKeyRepeat T +SDL_ClearError T +SDL_CloseAudio T +SDL_CondBroadcast T +SDL_CondSignal T +SDL_CondWait T +SDL_CondWaitTimeout T +SDL_Convert16LSB T +SDL_Convert16MSB T +SDL_Convert8 T +SDL_ConvertAudio T +SDL_ConvertEndian T +SDL_ConvertMono T +SDL_ConvertSign T +SDL_ConvertStereo T +SDL_ConvertStrip T +SDL_ConvertStrip_2 T +SDL_ConvertSurface T +SDL_ConvertSurround T +SDL_ConvertSurround_4 T +SDL_CreateCond T +SDL_CreateCursor T +SDL_CreateMutex T +SDL_CreateRGBSurface T +SDL_CreateRGBSurfaceFrom T +SDL_CreateSemaphore T +SDL_CreateThread T +SDL_CreateYUVOverlay T +SDL_CreateYUV_SW T +SDL_CursorInit T +SDL_CursorPaletteChanged T +SDL_CursorQuit T +SDL_Delay T +SDL_DestroyCond T +SDL_DestroyMutex T +SDL_DestroySemaphore T +SDL_DisplayFormat T +SDL_DisplayFormatAlpha T +SDL_DisplayYUVOverlay T +SDL_DisplayYUV_SW T +SDL_DitherColors T +SDL_DrawCursor T +SDL_DrawCursorNoLock T +SDL_EnableKeyRepeat T +SDL_EnableUNICODE T +SDL_EraseCursor T +SDL_EraseCursorNoLock T +SDL_Error T +SDL_EventOK B 8 +SDL_EventState T +SDL_EventThreadID T +SDL_FillRect T +SDL_FindColor T +SDL_FirstAudioFormat T +SDL_Flip T +SDL_FormatChanged T +SDL_FreeBlitMap T +SDL_FreeCursor T +SDL_FreeFormat T +SDL_FreeRW T +SDL_FreeSurface T +SDL_FreeWAV T +SDL_FreeYUVOverlay T +SDL_FreeYUV_SW T +SDL_GL_GetAttribute T +SDL_GL_GetProcAddress T +SDL_GL_LoadLibrary T +SDL_GL_Lock T +SDL_GL_SetAttribute T +SDL_GL_SwapBuffers T +SDL_GL_Unlock T +SDL_GL_UpdateRects T +SDL_GL_UpdateRectsLock T +SDL_GetAppState T +SDL_GetAudioStatus T +SDL_GetClipRect T +SDL_GetCursor T +SDL_GetErrBuf T +SDL_GetError T +SDL_GetErrorMsg T +SDL_GetEventFilter T +SDL_GetGamma T +SDL_GetGammaRamp T +SDL_GetKeyName T +SDL_GetKeyRepeat T +SDL_GetKeyState T +SDL_GetModState T +SDL_GetMouseState T +SDL_GetRGB T +SDL_GetRGBA T +SDL_GetRelativeMouseState T +SDL_GetThreadID T +SDL_GetTicks T +SDL_GetVideoInfo T +SDL_GetVideoSurface T +SDL_GetWMInfo T +SDL_Has3DNow T +SDL_Has3DNowExt T +SDL_HasAltiVec T +SDL_HasMMX T +SDL_HasMMXExt T +SDL_HasRDTSC T +SDL_HasSSE T +SDL_HasSSE2 T +SDL_Init T +SDL_InitSubSystem T +SDL_InstallParachute T +SDL_InvalidateMap T +SDL_JoystickClose T +SDL_JoystickEventState T +SDL_JoystickGetAxis T +SDL_JoystickGetBall T +SDL_JoystickGetButton T +SDL_JoystickGetHat T +SDL_JoystickIndex T +SDL_JoystickInit T +SDL_JoystickName T +SDL_JoystickNumAxes T +SDL_JoystickNumBalls T +SDL_JoystickNumButtons T +SDL_JoystickNumHats T +SDL_JoystickOpen T +SDL_JoystickOpened T +SDL_JoystickQuit T +SDL_JoystickUpdate T +SDL_KeyRepeat B 40 +SDL_KeyboardInit T +SDL_KeyboardQuit T +SDL_KillThread T +SDL_Linked_Version T +SDL_ListModes T +SDL_LoadBMP_RW T +SDL_LoadFunction T +SDL_LoadObject T +SDL_LoadWAV_RW T +SDL_LockAudio T +SDL_LockSurface T +SDL_LockYUVOverlay T +SDL_LockYUV_SW T +SDL_Lock_EventThread T +SDL_LowerBlit T +SDL_MapRGB T +SDL_MapRGBA T +SDL_MapSurface T +SDL_MixAudio T +SDL_MouseInit T +SDL_MouseQuit T +SDL_MouseRect T +SDL_MoveCursor T +SDL_NextAudioFormat T +SDL_NumJoysticks T +SDL_OpenAudio T +SDL_PauseAudio T +SDL_PeepEvents T +SDL_PollEvent T +SDL_PrivateAppActive T +SDL_PrivateExpose T +SDL_PrivateJoystickAxis T +SDL_PrivateJoystickBall T +SDL_PrivateJoystickButton T +SDL_PrivateJoystickHat T +SDL_PrivateKeyboard T +SDL_PrivateMouseButton T +SDL_PrivateMouseMotion T +SDL_PrivateQuit T +SDL_PrivateResize T +SDL_PrivateSysWMEvent T +SDL_ProcessEvents B 32 +SDL_PumpEvents T +SDL_PushEvent T +SDL_Quit T +SDL_QuitInit T +SDL_QuitQuit T +SDL_QuitSubSystem T +SDL_RLEAlphaBlit T +SDL_RLEBlit T +SDL_RLESurface T +SDL_RWFromConstMem T +SDL_RWFromFP T +SDL_RWFromFile T +SDL_RWFromMem T +SDL_RateDIV2 T +SDL_RateDIV2_c2 T +SDL_RateDIV2_c4 T +SDL_RateDIV2_c6 T +SDL_RateMUL2 T +SDL_RateMUL2_c2 T +SDL_RateMUL2_c4 T +SDL_RateMUL2_c6 T +SDL_RateSLOW T +SDL_ReadBE16 T +SDL_ReadBE32 T +SDL_ReadBE64 T +SDL_ReadLE16 T +SDL_ReadLE32 T +SDL_ReadLE64 T +SDL_ReallocFormat T +SDL_RemoveTimer T +SDL_ResetCursor T +SDL_ResetKeyboard T +SDL_ResetMouse T +SDL_RunAudio T +SDL_RunThread T +SDL_SYS_CDInit T +SDL_SYS_CDQuit T +SDL_SYS_CreateThread T +SDL_SYS_JoystickClose T +SDL_SYS_JoystickInit T +SDL_SYS_JoystickName T +SDL_SYS_JoystickOpen T +SDL_SYS_JoystickQuit T +SDL_SYS_JoystickUpdate T +SDL_SYS_KillThread T +SDL_SYS_SetupThread T +SDL_SYS_StartTimer T +SDL_SYS_StopTimer T +SDL_SYS_TimerInit T +SDL_SYS_TimerQuit T +SDL_SYS_WaitThread T +SDL_SaveBMP_RW T +SDL_SemPost T +SDL_SemTryWait T +SDL_SemValue T +SDL_SemWait T +SDL_SemWaitTimeout T +SDL_SetAlpha T +SDL_SetAlphaChannel T +SDL_SetClipRect T +SDL_SetColorKey T +SDL_SetColors T +SDL_SetCursor T +SDL_SetError T +SDL_SetEventFilter T +SDL_SetGamma T +SDL_SetGammaRamp T +SDL_SetModState T +SDL_SetPalette T +SDL_SetTimer T +SDL_SetTimerThreaded T +SDL_SetVideoMode T +SDL_ShowCursor T +SDL_SoftStretch T +SDL_StartEventLoop T +SDL_StartTicks T +SDL_StopEventLoop T +SDL_ThreadID T +SDL_ThreadedTimerCheck T +SDL_ThreadsInit T +SDL_ThreadsQuit T +SDL_TimerInit T +SDL_TimerQuit T +SDL_TranslateUNICODE B 4 +SDL_UnRLESurface T +SDL_UninstallParachute T +SDL_UnloadObject T +SDL_UnlockAudio T +SDL_UnlockSurface T +SDL_UnlockYUVOverlay T +SDL_UnlockYUV_SW T +SDL_Unlock_EventThread T +SDL_UpdateRect T +SDL_UpdateRects T +SDL_UpperBlit T +SDL_VideoDriverName T +SDL_VideoInit T +SDL_VideoModeOK T +SDL_VideoQuit T +SDL_WM_GetCaption T +SDL_WM_GrabInput T +SDL_WM_IconifyWindow T +SDL_WM_SetCaption T +SDL_WM_SetIcon T +SDL_WM_ToggleFullScreen T +SDL_WaitEvent T +SDL_WaitThread T +SDL_WarpMouse T +SDL_WasInit T +SDL_WriteBE16 T +SDL_WriteBE32 T +SDL_WriteBE64 T +SDL_WriteLE16 T +SDL_WriteLE32 T +SDL_WriteLE64 T +SDL_alarm_callback B 8 +SDL_alarm_interval B 4 +SDL_copysign T +SDL_cursor B 8 +SDL_cursorlock B 8 +SDL_cursorstate D 4 +SDL_getenv T +SDL_joysticks B 8 +SDL_ltoa T +SDL_memcpy T +SDL_mutexP T +SDL_mutexV T +SDL_numcds B 4 +SDL_numjoysticks B 1 +SDL_putenv T +SDL_revcpy T +SDL_scalbn T +SDL_sscanf T +SDL_strcasecmp T +SDL_strchr T +SDL_strcmp T +SDL_strdup T +SDL_strlwr T +SDL_strrchr T +SDL_strrev T +SDL_strstr T +SDL_strtod T +SDL_strtol T +SDL_strtoul T +SDL_strupr T +SDL_timer_running B 4 +SDL_timer_started B 4 +SDL_ultoa T +_Z15sdl_init_genodeRN6Genode3EnvE T diff --git a/repos/libports/recipes/api/sdl/content.mk b/repos/libports/recipes/api/sdl/content.mk new file mode 100644 index 0000000000..8da7b29c68 --- /dev/null +++ b/repos/libports/recipes/api/sdl/content.mk @@ -0,0 +1,27 @@ +MIRROR_FROM_REP_DIR := lib/symbols/sdl lib/import/import-sdl.mk \ + lib/mk/mesa_api.mk lib/mk/sdlmain.mk + +content: $(MIRROR_FROM_REP_DIR) src/lib/sdl include LICENSE + +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) + +SDL_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/sdl) +MESA_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mesa) + +# +# The Mesa header files needed for SDL_OpenGL are copied as well. +# +include: + mkdir -p $@ + cp -r $(SDL_PORT_DIR)/include/SDL $@/ + cp -r $(REP_DIR)/include/SDL $@/ + cp -r $(MESA_PORT_DIR)/include/mesa/* $@/ + cp -r $(REP_DIR)/include/EGL $@/ + +src/lib/sdl: + mkdir -p $@ + cp -r $(REP_DIR)/src/lib/sdl/sdl_main.cc $@/ + +LICENSE: + cp $(SDL_PORT_DIR)/src/lib/sdl/COPYING $@ diff --git a/repos/libports/recipes/api/sdl/hash b/repos/libports/recipes/api/sdl/hash new file mode 100644 index 0000000000..6c7c297da2 --- /dev/null +++ b/repos/libports/recipes/api/sdl/hash @@ -0,0 +1 @@ +2017-12-05 7ba6b398032ec0dc7f34b7bb4382e6feab52434c diff --git a/repos/libports/recipes/src/sdl/README b/repos/libports/recipes/src/sdl/README new file mode 100644 index 0000000000..9e255eff9c --- /dev/null +++ b/repos/libports/recipes/src/sdl/README @@ -0,0 +1,3 @@ +SDL itself does not depend on base, os and timer_session APIs. The libc, +however, does (via its pthread dependency) and therefor we have to include +it here. diff --git a/repos/libports/recipes/src/sdl/api b/repos/libports/recipes/src/sdl/api new file mode 100644 index 0000000000..81c362ebf8 --- /dev/null +++ b/repos/libports/recipes/src/sdl/api @@ -0,0 +1 @@ +sdl diff --git a/repos/libports/recipes/src/sdl/content.mk b/repos/libports/recipes/src/sdl/content.mk new file mode 100644 index 0000000000..e7020c4751 --- /dev/null +++ b/repos/libports/recipes/src/sdl/content.mk @@ -0,0 +1,18 @@ +content: src/lib/sdl/target.mk lib/mk LICENSE + +PORT_DIR := $(call port_dir,$(REP_DIR)/ports/sdl) + +src/lib/sdl: + mkdir -p $@ + cp -r $(PORT_DIR)/src/lib/sdl/* $@ + cp -r $(REP_DIR)/src/lib/sdl/* $@ + +src/lib/sdl/target.mk: src/lib/sdl + echo "LIBS += sdl" > $@ + +lib/mk: + mkdir -p $@ + cp $(REP_DIR)/$@/sdl.mk $@ + +LICENSE: + cp $(PORT_DIR)/src/lib/sdl/COPYING $@ diff --git a/repos/libports/recipes/src/sdl/hash b/repos/libports/recipes/src/sdl/hash new file mode 100644 index 0000000000..78a6d2e401 --- /dev/null +++ b/repos/libports/recipes/src/sdl/hash @@ -0,0 +1 @@ +2017-12-05 109f9ad2b50bcf02c5196f185ef4d65cb8d42a9e diff --git a/repos/libports/recipes/src/sdl/used_apis b/repos/libports/recipes/src/sdl/used_apis new file mode 100644 index 0000000000..f88cce1568 --- /dev/null +++ b/repos/libports/recipes/src/sdl/used_apis @@ -0,0 +1,9 @@ +base +os +so +libc +zlib +audio_out_session +framebuffer_session +input_session +timer_session