Bug 206910 - x11-toolkits/scintilla & editors/scite: Update to 3.6.3
Summary: x11-toolkits/scintilla & editors/scite: Update to 3.6.3
Status: Closed DUPLICATE of bug 206751
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-02-04 08:44 UTC by lightside
Modified: 2016-02-08 02:58 UTC (History)
1 user (show)

See Also:
cyberbotx: maintainer-feedback+


Attachments
Proposed patch for x11-toolkits/scintilla (since 402317 revision) (2.34 KB, patch)
2016-02-04 08:44 UTC, lightside
koobs: maintainer-approval? (cyberbotx)
Details | Diff
Proposed patch for editors/scite (since 402318 revision) (851 bytes, patch)
2016-02-04 08:45 UTC, lightside
koobs: maintainer-approval? (cyberbotx)
Details | Diff
The poudriere testport log (FreeBSD 10.2 amd64): x11-toolkits/scintilla (7.63 KB, application/x-bzip2)
2016-02-04 08:45 UTC, lightside
no flags Details
The poudriere testport log (FreeBSD 10.2 amd64): editors/scite (7.79 KB, application/x-bzip2)
2016-02-04 08:46 UTC, lightside
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2016-02-04 08:44:21 UTC
Created attachment 166538 [details]
Proposed patch for x11-toolkits/scintilla (since 402317 revision)

Patch to update x11-toolkits/scintilla and editors/scite ports from 3.6.2 to 3.6.3 version.

Look following link for changes:
http://www.scintilla.org/ScintillaHistory.html

x11-toolkits/scintilla:
- Update files/patch-makefile
- Add a sed patch to remove used PICFLAGS define from provided gtk/makefile, which makes it possible to differentiate between "-fPIC" and "-fpic" flags as it was before 3.6.3 version, based on processor architecture in port's Makefile

I'm not sure about sed patch for PICFLAGS define, but there are various changes related to "-fPIC" and/or "-fpic" flags in svn history of x11-toolkits/scintilla port:
- "Update to 1.38" (removal of -fPIC flag):
https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/files/patch-makefile?r1=41542&r2=43584
- "Fix build on sparc64 by not adding -fpic to CFLAGS":
https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=106784&r2=127988
- "Add -fPIC to CFLAGS to fix the build on amd64":
https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=127988&r2=145528
- "Make sure the PIC CFLAGS are properly used for all objects":
https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/files/patch-makefile?r1=127988&r2=145531
- "Fix linking and sparc64 build; small clean-up":
https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=281243&r2=281725

According to these svn logs and current GCC manual documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Code-Gen-Options.html#index-fpic-2808), there are actual differences between "-fPIC" and "-fpic" flags, therefore I decided to propose a sed patch for what it was before 3.6.3 version.
Comment 1 lightside 2016-02-04 08:45:11 UTC
Created attachment 166539 [details]
Proposed patch for editors/scite (since 402318 revision)
Comment 2 lightside 2016-02-04 08:45:54 UTC
Created attachment 166540 [details]
The poudriere testport log (FreeBSD 10.2 amd64): x11-toolkits/scintilla
Comment 3 lightside 2016-02-04 08:46:32 UTC
Created attachment 166541 [details]
The poudriere testport log (FreeBSD 10.2 amd64): editors/scite
Comment 4 Naram Qashat 2016-02-04 14:15:49 UTC
I've already submitted this update as bug #206751 albeit without the edit for the PIC flags in the scintilla port. I'll ask for this bug to be closed because I already submitted it, but is the PIC flags patch absolutely necessary? There were no issues with building it for amd64 or i386.
Comment 5 lightside 2016-02-05 00:46:20 UTC
Hello, Naram Qashat.

(In reply to comment #4)
> I've already submitted this update as bug #206751 albeit without the edit for
> the PIC flags in the scintilla port.

Sorry, I didn't see this on PortsMon on time of checking the port update (may be because of outdated information):
http://portsmon.freebsd.org/portoverview.py?category=x11-toolkits&portname=scintilla

(In reply to comment #4)
> I'll ask for this bug to be closed because I already submitted it, but is the
> PIC flags patch absolutely necessary? There were no issues with building it
> for amd64 or i386.

Sure, I can close it or it could be marked as duplicate of bug #206751.

I also didn't have issues on amd64 for build and run without changes for PIC flags, but after reading the build log I found "-fPIC" added, along with "-DPIC -fpic", which was strange from the logic of the port's Makefile. Then I found following commit, which was cause of this:
http://sourceforge.net/p/scintilla/code/ci/255c6d20fa88b2aa1ebbc67c0a139f6f1595d126/

After reading parts of GCC documentation, the svn logs for x11-toolkits/scintilla port, related to sparc64 architecture,  I decided to propose current solution. Unfortunately, I can't test this on other architectures to be sure.

Anyway, there is a possibility to use the proposed sed patch for PICFLAGS define, if you find it useful.
Comment 6 lightside 2016-02-05 00:48:02 UTC

*** This bug has been marked as a duplicate of bug 206751 ***
Comment 7 lightside 2016-02-08 02:58:28 UTC
I created following test case, based on GCC manual documentation:
-8<--
#include <stdio.h>

int main() {
	printf("__pic__ = %d, __PIC__ = %d\n", __pic__, __PIC__);

	return 0;
}
-->8-

And run it with following configurations:
% cc -fpic test.c -o test && ./test
__pic__ = 1, __PIC__ = 1
% cc -fPIC test.c -o test && ./test
__pic__ = 2, __PIC__ = 2
% cc -fPIC -fpic test.c -o test && ./test
__pic__ = 1, __PIC__ = 1
% cc -fpic -fPIC test.c -o test && ./test
__pic__ = 2, __PIC__ = 2

In result, the last option (either -fpic or -fPIC) was used. If this is how it works, then it should be ok for x11-toolkits/scintilla port, as long as port's CFLAGS applied last (and this is current case).