Index: head/graphics/milton/Makefile =================================================================== --- head/graphics/milton/Makefile (revision 496551) +++ head/graphics/milton/Makefile (revision 496552) @@ -1,32 +1,51 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ PORTNAME= milton PORTVERSION= 1.6.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= graphics MAINTAINER= danfe@FreeBSD.org COMMENT= Infinite-canvas paint program -LICENSE= MIT +LICENSE= GPLv3+ +BUILD_DEPENDS= icotool:graphics/icoutils + USE_GITHUB= yes GH_ACCOUNT= serge-rgb USES= cmake gl gnome USE_GL= gl USE_GNOME= gtk20 -USE_SDL= sdl2 +USE_SDL= sdl2 image2 +INSTALLS_ICONS= yes -PLIST_FILES= bin/milton +PLIST_FILES= bin/milton ${DATADIR_REL}/Carlito.ttf +.for n in 16 32 48 64 128 256 +PLIST_FILES+= share/icons/hicolor/${n}x${n}/apps/milton.png +.endfor post-patch: @${REINPLACE_CMD} -e 's:__linux__:__${OPSYS}__:' \ ${WRKSRC}/src/easytab.h + @${REINPLACE_CMD} -e 's:Carlito\.ttf:${DATADIR}/&:' \ + ${WRKSRC}/src/sdl_milton.cc + @${REINPLACE_CMD} -e 's:milton\.png:${PREFIX}/share/icons/hicolor/256x256/apps/&:' \ + ${WRKSRC}/src/platform_linux.cc do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/Milton \ ${STAGEDIR}${PREFIX}/bin/milton + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/third_party/Carlito.ttf \ + ${STAGEDIR}${DATADIR} +.for n in 16 32 48 64 128 256 + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps + ${INSTALL_DATA} ${INSTALL_WRKSRC}/milton_icon_?_${n}x${n}x32.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps/milton.png +.endfor .include Index: head/graphics/milton/files/patch-CMakeLists.txt =================================================================== --- head/graphics/milton/files/patch-CMakeLists.txt (revision 496551) +++ head/graphics/milton/files/patch-CMakeLists.txt (revision 496552) @@ -1,46 +1,59 @@ --- CMakeLists.txt.orig 2019-03-15 04:11:43 UTC +++ CMakeLists.txt @@ -41,7 +41,7 @@ else() endif() set(CMAKE_CXX_FLAGS_DEBUG "-g") -set(CMAKE_CXX_FLAGS_RELEASE "-O3") +#set(CMAKE_CXX_FLAGS_RELEASE "-O3") message(STATUS "Building ${CMAKE_BUILD_TYPE}") @@ -71,13 +71,14 @@ if(UNIX) ${UnixCFlags}) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") find_package(OpenGL REQUIRED) find_package(GTK2 2.6 REQUIRED gtk) find_package(X11 REQUIRED) find_library(XINPUT_LIBRARY libXi.so) find_package(Threads REQUIRED) + find_package(SDL2 REQUIRED) if(XINPUT_LIBRARY STREQUAL "XINPUT_LIBRARY-NOTFOUND") message(FATAL_ERROR "Could not find libXi.so") @@ -98,7 +99,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") target_include_directories(Milton PRIVATE ${GTK2_INCLUDE_DIRS} ${X11_INCLUDE_DIR} - ${SDL2DIR}/build/linux64/include/SDL2 + ${SDL2_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ) @@ -107,8 +108,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") ${X11_LIBRARIES} ${OPENGL_LIBRARIES} ${XINPUT_LIBRARY} - ${SDL2DIR}/build/linux64/lib/libSDL2maind.a - ${SDL2DIR}/build/linux64/lib/libSDL2d.a -+ ${SDL2_LIBRARIES} ++ ${SDL2_LIBRARIES} SDL2_image ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ) +@@ -132,11 +132,8 @@ if(WIN32 OR APPLE) + endif() + + add_custom_command(TARGET Milton POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy ++ COMMAND icotool -x + ${CMAKE_CURRENT_LIST_DIR}/milton_icon.ico +- ${CMAKE_CURRENT_LIST_DIR}/third_party/Carlito.ttf +- ${CMAKE_CURRENT_LIST_DIR}/third_party/Carlito.LICENSE +- $ + ) + + add_dependencies(Milton shadergen) Index: head/graphics/milton/files/patch-src_platform__linux.cc =================================================================== --- head/graphics/milton/files/patch-src_platform__linux.cc (nonexistent) +++ head/graphics/milton/files/patch-src_platform__linux.cc (revision 496552) @@ -0,0 +1,24 @@ +--- src/platform_linux.cc.orig 2019-03-15 04:11:43 UTC ++++ src/platform_linux.cc +@@ -1,6 +1,8 @@ + // Copyright (c) 2015 Sergio Gonzalez. All rights reserved. + // License: https://github.com/serge-rgb/milton#license + ++#include ++ + #include "platform.h" + + #include "common.h" +@@ -318,5 +320,12 @@ platform_deinit(PlatformState* platform) + void + platform_setup_cursor(Arena* arena, PlatformState* platform) + { ++ SDL_Surface *surface; + ++ surface = IMG_Load("milton.png"); ++ if (surface == NULL) ++ return; ++ ++ SDL_SetWindowIcon(platform->window, surface); ++ SDL_FreeSurface(surface); + } Property changes on: head/graphics/milton/files/patch-src_platform__linux.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property