svn commit: r513340 - in head/graphics/milton: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Mon Sep 30 10:06:36 UTC 2019
Author: danfe
Date: Mon Sep 30 10:06:34 2019
New Revision: 513340
URL: https://svnweb.freebsd.org/changeset/ports/513340
Log:
Update `graphics/milton' to version 1.9.0.
Reported by: portscout
Modified:
head/graphics/milton/Makefile
head/graphics/milton/distinfo
head/graphics/milton/files/patch-src_platform__linux.cc
Modified: head/graphics/milton/Makefile
==============================================================================
--- head/graphics/milton/Makefile Mon Sep 30 09:42:50 2019 (r513339)
+++ head/graphics/milton/Makefile Mon Sep 30 10:06:34 2019 (r513340)
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= milton
-PORTVERSION= 1.6.2
-PORTREVISION= 1
+PORTVERSION= 1.9.0
DISTVERSIONPREFIX= v
CATEGORIES= graphics
@@ -17,7 +16,7 @@ BUILD_DEPENDS= icotool:graphics/icoutils
USE_GITHUB= yes
GH_ACCOUNT= serge-rgb
-USES= cmake compiler:c++11-lang gl gnome sdl
+USES= cmake compiler:c++11-lang gl gnome sdl xorg
USE_GL= gl glu
USE_GNOME= cairo gtk20
USE_SDL= sdl2 image2
@@ -32,6 +31,8 @@ PLIST_FILES+= share/icons/hicolor/${n}x${n}/apps/milto
post-patch:
@${REINPLACE_CMD} -e 's:__linux__:__${OPSYS}__:' \
${WRKSRC}/src/easytab.h
+ @${REINPLACE_CMD} -e '39s:^:#undef COUNT:' \
+ ${WRKSRC}/src/milton.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/&:' \
Modified: head/graphics/milton/distinfo
==============================================================================
--- head/graphics/milton/distinfo Mon Sep 30 09:42:50 2019 (r513339)
+++ head/graphics/milton/distinfo Mon Sep 30 10:06:34 2019 (r513340)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1559748893
-SHA256 (serge-rgb-milton-v1.6.2_GH0.tar.gz) = 2f8dc4dd912eda2afe16b741def1eb0136dbd7da910d8715a5406169a342ac87
-SIZE (serge-rgb-milton-v1.6.2_GH0.tar.gz) = 12062781
+TIMESTAMP = 1569705067
+SHA256 (serge-rgb-milton-v1.9.0_GH0.tar.gz) = fd6ae60c41db203a1f6008c0d82b74ce527a05f47b25234560d2b7596bbca073
+SIZE (serge-rgb-milton-v1.9.0_GH0.tar.gz) = 12068156
Modified: head/graphics/milton/files/patch-src_platform__linux.cc
==============================================================================
--- head/graphics/milton/files/patch-src_platform__linux.cc Mon Sep 30 09:42:50 2019 (r513339)
+++ head/graphics/milton/files/patch-src_platform__linux.cc Mon Sep 30 10:06:34 2019 (r513340)
@@ -1,4 +1,4 @@
---- src/platform_linux.cc.orig 2019-03-15 04:11:43 UTC
+--- src/platform_linux.cc.orig 2019-09-28 21:11:07 UTC
+++ src/platform_linux.cc
@@ -1,6 +1,8 @@
// Copyright (c) 2015 Sergio Gonzalez. All rights reserved.
@@ -9,8 +9,26 @@
#include "platform.h"
#include "common.h"
-@@ -318,5 +320,12 @@ platform_deinit(PlatformState* platform)
+@@ -30,7 +32,7 @@ perf_counter()
+ milton_log("Something went wrong with clock_gettime\n");
+ }
+
+- return tp.tv_nsec;
++ return tp.tv_sec * 1000 * 1000 * 1000 + tp.tv_nsec;
+ }
+
void
+@@ -148,7 +150,7 @@ platform_dialog_yesno(char* info, char* title)
+ }
+
+ YesNoCancelAnswer
+-platform_dialog_yesnocancel(char* info, char* title);
++platform_dialog_yesnocancel(char* info, char* title)
+ {
+ // NOTE: As of 2019-09-23, this function hasn't been tested on Linux.
+
+@@ -342,5 +344,32 @@ platform_deinit(PlatformState* platform)
+ void
platform_setup_cursor(Arena* arena, PlatformState* platform)
{
+ SDL_Surface *surface;
@@ -21,4 +39,24 @@
+
+ SDL_SetWindowIcon(platform->window, surface);
+ SDL_FreeSurface(surface);
++}
++
++v2i
++platform_cursor_get_position(PlatformState* platform)
++{
++ v2i pos;
++
++ SDL_GetMouseState(&pos.x, &pos.y);
++ return pos;
++}
++
++void
++platform_cursor_set_position(PlatformState* platform, v2i pos)
++{
++ SDL_WarpMouseInWindow(platform->window, pos.x, pos.y);
++
++ // Pending mouse move events will have the cursor close
++ // to where it was before we set it.
++ SDL_FlushEvent(SDL_MOUSEMOTION);
++ SDL_FlushEvent(SDL_SYSWMEVENT);
}
More information about the svn-ports-head
mailing list