Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 857636 - dev-php/pecl-geoip: Last rites
Summary: dev-php/pecl-geoip: Last rites
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2022-07-11 13:32 UTC by Brian Evans (RETIRED)
Modified: 2022-08-09 07:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Evans (RETIRED) gentoo-dev 2022-07-11 13:32:43 UTC
# Brian Evans <grknight@gentoo.org> (2022-07-11)
# The database behind this extension is no longer available
# Please migrate to dev-php/maxmind-db-reader optionally with its
# bundled extension.
# Removal on 2022-08-10.
dev-php/pecl-geoip
Comment 1 Matthias Hanft 2022-07-16 17:29:18 UTC
dev-php/maxmind-db-reader isn't available for x86. Any suggestions?
(other than "upgrade to amd64")
Comment 2 Brian Evans (RETIRED) gentoo-dev 2022-07-17 12:02:04 UTC
(In reply to Matthias Hanft from comment #1)
> dev-php/maxmind-db-reader isn't available for x86. Any suggestions?
> (other than "upgrade to amd64")

Test it, it might work.  If it does, it can be keyworded.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2022-07-17 12:06:11 UTC
(In reply to Brian Evans from comment #2)
> (In reply to Matthias Hanft from comment #1)
> > dev-php/maxmind-db-reader isn't available for x86. Any suggestions?
> > (other than "upgrade to amd64")
> 
> Test it, it might work.  If it does, it can be keyworded.

What I mean here is test the extension building.  The PHP code should always work.
Comment 4 Matthias Hanft 2022-07-18 07:36:45 UTC
Works like a charm.

In particular:

/etc/portage/package.accept_keywords:
dev-php/maxmind-db-reader **

/etc/portage/package.use:
dev-php/maxmind-db-reader extension

emerge dev-php/maxmind-db-reader
(a few "notes" and "warnings" while compiling,
mostly "possibly uninitialized variables")

Copied the example from https://github.com/maxmind/MaxMind-DB-Reader-php
(removing "require_once" and replacing "GeoIP2-City.mmdb" by "/usr/share/GeoIP/GeoLite2-City.mmdb")

Output (as expected):
Array
(
    [city] => Array
        (
            [geoname_id] => 5140405
            [names] => Array
                (
                    [de] => Syracuse
                    [en] => Syracuse
                    [es] => Siracusa
                    [fr] => Syracuse
                    [ja] => ã·ã©ã­ã¥ã¼ãº
                    [pt-BR] => Syracuse
                    [ru] => СиÑакÑÑÑ
                    [zh-CN] => é¡æä¸å
¹
                )

        )

    [continent] => Array
        (
            [code] => NA
            [geoname_id] => 6255149
            [names] => Array
                (
                    [de] => Nordamerika
                    [en] => North America
                    [es] => Norteamérica
                    [fr] => Amérique du Nord
                    [ja] => åã¢ã¡ãªã«
                    [pt-BR] => América do Norte
                    [ru] => СевеÑÐ½Ð°Ñ ÐмеÑика
                    [zh-CN] => åç¾æ´²
                )

        )
...and so on...

Tested with PHP 7.4, 8.0, and 8.1.
Comment 5 Larry the Git Cow gentoo-dev 2022-08-09 07:12:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed1e3e3e8d7a610fafe873075454b35a2079b04a

commit ed1e3e3e8d7a610fafe873075454b35a2079b04a
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2022-08-09 07:11:40 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2022-08-09 07:11:40 +0000

    dev-php/pecl-geoip: treeclean
    
    Closes: https://bugs.gentoo.org/857636
    Closes: https://bugs.gentoo.org/526244
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-php/pecl-geoip/Manifest                        |  1 -
 .../pecl-geoip/files/fix-failing-tests-1.1.1.patch | 46 -----------
 .../files/fix-failing-tests-php8-1-1.1.1.patch     | 71 -----------------
 dev-php/pecl-geoip/files/php8-support-1.1.1.patch  | 93 ----------------------
 dev-php/pecl-geoip/metadata.xml                    |  8 --
 dev-php/pecl-geoip/pecl-geoip-1.1.1-r4.ebuild      | 22 -----
 dev-php/pecl-geoip/pecl-geoip-1.1.1-r5.ebuild      | 26 ------
 profiles/package.mask                              |  7 --
 8 files changed, 274 deletions(-)